LOWER TO UPPER CASE C++

Document Sample
LOWER TO UPPER CASE C++ Powered By Docstoc
					# include <iostream.h>
# include <ctype.h>
# include <stdlib.h>
void u (char *);
main()
{
char a[30]="welcome to leads university";
cout<<"The string before conversion is: \t"<<a<<'\n';
cout<<"\nNow it will be converted to upper case\n\n";
u (a);
cout<<"The string before conversion is: \t"<<a<<'\n';

system("PAUSE");
}

void u (char*r)
{
while (*r!='\0')
{
if (islower(*r))

*r = toupper(*r);
 r++;

    }
}

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:10
posted:9/22/2012
language:English
pages:1
Description: LOWER TO UPPER CASE C++