Thursday, September 27, 2018

converting string into uppercase - strupr() - string.h

#include<string.h>
#include<iostream>
using namespace std;
// Program to convert a string into upper case

main()
{
char str[100];
cout<<"Enter a String ";
cin.getline(str,100);

cout<<"\n Original String = " <<str;
strupr(str);
cout<<"\n Changed String = " <<str;
}

No comments:

Post a Comment