Program to accept a string in upper case and print it by lower case - 100 Most Important C# Programs

100 Most Important C# Programs

29. Program to accept a string in upper case and print it by lower case.

Code:

# 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( );

}