Answer:
Check the explanation
Step-by-step explanation:
#include <stdio.h>
#include<ctype.h>
#include<string.h>
void MyToUpper(char *p)
{
int i;
for(i=0;i<strlen(p);i++)
{
p[i]=toupper(p[i]);
}
}
int main(void) {
char str[20];
printf("Enter a string:");
fgets(str,20,stdin);
printf("The string you entered was: %s\\",str);
MyToUpper(str);
printf("The string converted to uppercase is: %s\\",str);
fflush(stdin);
return 0;
}