Complete Video Learning
Table of Contents
#include<stdio.h> #include<conio.h> main() { char s[100]; int i; printf("\nEnter a string : "); gets(s); for (i = 0; s[i]!='\0'; i++) { if(s[i] >= 'a' && s[i] <= 'z') { s[i] = s[i] - 32; } } printf("\nString in Upper Case = %s", s); getch(); }
Enter the string : f
String in Upper Case = F