Wow, I appreciate the quick replies. Thank you everyone.
I laughed hard when I found out that
toupper ()
exist. I would love to just turn in a function that calls that if I knew that wouldn't earn me a 0.
I also appreciate everyone's knowledge on here, but I must also regret to inform that if I turned in anything that was written here I'd also earn a 0.
He requires things in a very exact way, and if they aren't done to his
EXACT specification, doesn't matter if it works, is elegant, simple, or... anything, it earns a 0 because it isn't what he wants.
void toUpper(char String[], int arrayLength)
will earn me a 0 because it isn't
void toUpper (char string []);
Which is what he is requiring...
Using:
array[i] = toupper(array[i]);
Will also earn me a zero because it's calling another function to do the dirty work.
I think the first answer might have said it best
Although using the word "return" so much with "void" isn't the best way to say it. |
Thinking teacher is just very poor at wording instructions for someone who requires things in such an exact manner.
Not even joking I've got about a 60% for a grade in this class and got a zero on the last 3 assignments because I did something like use pass by reference instead of pass by value in a function, or named my program the wrong file name, or named a variable wrong... I've never taken a class where I could do every problem in the book up to the point we are at, get the right answer, everything compiles, runs without errors, and yet get so many zeros for grades... Pretty sure I'm going to have to retake this class with a different teacher, at least that means I can concentrate on my other classes then... :-/