I have written program which changes from lowercase letter to uppercase. Problem is, i dont know how to make it read whole text instead of one line. Program returns output after pressing enter and I want it to do so, after CTRL+Z.
#include <stdlib.h>
#include <stdio.h>
void makeUpper(char *s) {
int i;
for(i = 0; s[i] != '\0'; i++){
s[i] = toupper(s[i]);
}
printf("%s", s);
}
int main() {
char string[1000];
fgets(string, 1000, stdin);
makeUpper(string);
return 0;
}