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

I am going over some notes, and I can\'t get this simple program to work. I am t

ID: 3623956 • Letter: I

Question

I am going over some notes, and I can't get this simple program to work. I am trying to convert the lowercase letters to upper case. The function is from teacher, and I created the main. My output is: The letter is: D. I tried adding * , &, and %s.

I do not want to use built in functions!


/* change lowercase to uppercase*/

#include <stdlib.h>
#include <stdio.h>

char toUpper(char ch){
if(ch >= 'a' && ch <= 'z'){
ch += ('A' - 'a');
return ch;
}
}

int main()
{
char *letter = 'b';
toUpper(letter);
printf("The letter is: %c ", &letter);

system("PAUSE");
return 0;
}

Explanation / Answer

#include #include char toUpper(char ch) { if(ch >= 'a' && ch