; LOWER TO UPPER CASE C++
Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out
Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

LOWER TO UPPER CASE C++

VIEWS: 10 PAGES: 1

LOWER TO UPPER CASE C++

More Info
  • pg 1
									# 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++;

    }
}

								
To top