Write a C Program to change all alphabets to UPPER CASE



UPPER CASE




#include <stdio.h>





void main()



{



 char str[100];



 int i;



 printf("Please enter a string: ");



 fgets(str, 100, stdin);





 for(i=0;str[i]!=NULL;i++)



 {



  if(str[i]>='a'&&str[i]<='z')



   str[i]-=32;



 }





 printf("String in UPPER case is: %s",str);





}








Comments

Popular posts from this blog

Write a Program to Add two 3x3 Matrix using C

C program for Unit Conversion

Write a Program to Add two 5x5 Matrix using C