Thursday, 2 October 2014

WAP to covert a String into Upper case


#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
//char b='A';
char a[100];
char *k=a;
printf("\n Enter the String ");
gets(a);
while(*k)
{
if(*k>='a' && *k<='z' )
{
*k=*k-32;
}
k++;
}
printf("%s",a);
getch();
}

No comments:

Post a Comment

Please write your doubts