#include<stdio.h>
void lwr2upr(char []);
void main()
{
char text[20];
clrscr();
printf("\nEnter a string :\n");
gets(text);
lwr2upr(text);
getch();
}
void lwr2upr(char text[])
{
int a,len;
len=strlen(text);
for(a=0;a<len;a++)
if(text[a]>96&&text[a]<123)
text[a]-=32;
printf("\nString after conversion :\n%s",text);
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.