I have homework and I need help. I did not come here to get someone to do my job, only to help me.
I need to create my own library string.h "(the actual header and function file), so I am forbidden to use and , They also recommended that we not use malloc, but it was just a recommendation, and not forbidden. For most functions, I know how they I planned to save "strings", for example arrays of characters, for example: #include <string.h>#include <ctypes.h>
char array[50];
But I ran into the problem of creating toupper and tolower functions. Of course, I can do huge switching cases or a lot if (otherwise, if) like this:
if(string[i]=='a') {string[i]=='A' };
else if(string[i]=='b') {string[i]=='B' };
.
.
.
else if(string[i]=='z') {string[i]=='Z' };
But is there a better solution?
, :
ThisISSomESTRing123.
, toupper , :
ThisISSomESTRing123.
puts (), ? "printf" "for"?