Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Specifer



Header file



Iterative statement



Test expression



Comment




String_ convert from lowercase to UPPERCASE of given string




// AHF C PROGRAM SOLVING

//solving here 2_D   ARRAY 	programming problem

#include #define pf printf int main() { char str[10000]; int i; pf("Enter the string: "); gets(str); pf("\nThe string was in lower case and the upper case is: \n\n"); for(i=0;str[i]!='\0';i++) { if(str[i]>='a' && str[i]<='z') pf("%c",str[i]-32); //converting uppercase each word else pf("%c",str[i]); //if given uppercase remain uppercase } return 0; }
OUTPUT:


© 2018 - All rights reserved