Tagged Questions
9
votes
2answers
72 views
Scalability of running commands from user input
Here is some code I have that has been extracted and shrunk down from a project of mine.
...
7
votes
1answer
249 views
Command line reverse polish calculator
Write the program expr, which evaluates a reverse Polish expression from the command line, where each operator or operand is a separate argument.
For ...
7
votes
1answer
150 views
implementations of strncmp, strncat, strncpy
Write versions of the library functions strncpy, strncat and strncmp, which operate on ...
6
votes
3answers
6k views
Min / Max function of 1D array in C / C++
Due to software constraints, I cannot use the standard libraries, math.h,algorithm, templates, inline, or ...
6
votes
1answer
72 views
Functions that converts day of year to month and day and reverse with error checking
There is no error checking in day_of_year or month_day. remedy this defect.
Here is the solution:
...
5
votes
1answer
56 views
4
votes
2answers
133 views
4
votes
3answers
677 views
C Split function review
I started learning C a week ago, and here is my implementation for the split function:
...
4
votes
2answers
1k views
Function pointers and switch statements
I feel like I can make my switch statements more elegant with a function pointer, i.e. I'd like to set the digestLength and a pointer to a function in the same ...
3
votes
5answers
186 views
“Buy and Sell” game project
This is a buy and sell game. I've revised it, though it's still unfinished. I would appreciate it if someone could review it again for me.
...
3
votes
2answers
135 views
Does my function code adhere to C standards?
I am relatively new to C and would like some feedback on a function that I have written, if it adheres to C standards or if there are some other things which I could have done better/differently.
The ...
2
votes
1answer
315 views
Matrix Transpose Function in C - Improve Performance
I have a matrix transpose function that takes arrays with a possibly different number of rows and columns.
How to improve performance and code quality?
...
2
votes
0answers
420 views
Arduino based SNES controller wireless transmitter/reciever, code questions [closed]
I am building a transmitter and reciever pair for two SNES controllers, as I don't like using long extension cords to get the controllers to reach the couch. I'm using atmega328p's for the avr's, ...
1
vote
4answers
459 views
1
vote
3answers
170 views
Checking success on functions in C/C++ [closed]
I am trying to understand best practices for C\C++ functions which retrieve data but must also give success/failure information.
Which is better, or is something different all together the correct ...
1
vote
3answers
177 views
Review: Compare two Anagrams words in C
A simple attempt by me to test whether two words are anagrams or not. Here is the code:
...
1
vote
1answer
83 views
Parsing function review. How to improve it?
I've written a function to parse configuration files, it doesn't handle file opening, instead it takes an array with the file contents, tries to find fields based on an array containing the fields' ...
-5
votes
1answer
201 views
how can i improve/reduce this code? [closed]
any type of suggestion/correction will do, and i can't seem to get my functions to work or my conditional statements.
...