Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please and must explain/show work, thank you! c) The following function should a

ID: 3752720 • Letter: P

Question

Please and must explain/show work, thank you!

c) The following function should allocate space for a new string, copy the string from the passed argument into the new string, and convert every lower-case character in the new string into an upper-case character (do not modify the original string). Fill-in the blanks and the body of the for0 loop: char upcase(char str) l char* p; char* result; result - (char*) malloc( strcpy for( p-result; *p!O' p J; D; /* Fill-in 'A - 65, 'a' - 97, 'Z" - 90, 'z 122*/ return result;

Explanation / Answer

char *upcase(char *str) { char *p; char *result; result = (char*)malloc(sizeof(char)*(strlen(str)+1)); strcpy(result, str); for(p = result; *p != ''; p++) { if(*p >= 'a' && *p
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote