Convert lower case string to uper case
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
//Convert lowerCase String to Upper Case, //compiler used is g++ #include <iostream> #include <string> #include <string.h> using namespace std; int main(){ char str[100]="manoj"; int len=strlen(str); for(int i=0;i<len;i++) { str[i]=str[i]-32; } cout<<"String is "<<endl; for(int i=0;i<len;i++) { cout<<str[i]; } cout<<endl; } |
1,546 total views, no views today
1,546 total views, no views today