Problem 29. C Program to accept a string in upper case and print it by lower case.
#include<stdio.h>
#include<conio.h>
main( )
{
char ch,c;
clrscr();
printf(“enter a string in upper case:”);
while(( ch=getchar( ))!=’n’)
{
c=ch+32;
putchar(c);
}
printf(“ is in lower case”);
getch( );
}
C compiler: gcc 4.1.2
#include<stdio.h>
#include<conio.h>
main( )
{
char ch,c;
clrscr();
printf(“enter a string in upper case:”);
while(( ch=getchar( ))!=’n’)
{
c=ch+32;
putchar(c);
}
printf(“ is in lower case”);
getch( );
}
C compiler: gcc 4.1.2
