Program in C++ to convert string Lowercase into Uppercase
#include<iostream> #include<string.h> #include<conio.h> using namespace std; char* StrUpper(char *str) { int i; for(i=0;str[i]!='\0';i++) { str[i]=str[i]-32; } return (str); } int main() { char str1[100],*str2; cout<<"Enter string :-"; cin.getline(str1,99); str2=StrUpper(str1); cout<<" Result ="<<str2; return 0; }Output:-
Related Programs -
- Program in C++ to compare two string
- Program in C++ to copy one word into another word
- Program in C++ to add two string
- Program in C++ to convert string Uppercase to Lowercase
- Program in C++ to count words in given sentence
0 Comments