Completely Solved C, C++ Programs Assignment.




C Program to accept a character in any case and print in another case.

Filed Under:

Problem 26. C Program to accept a character in any case and print in another case.
#include<stdio.h>
#include<conio.h>
main( )
{
char ch,c1;
clrscr( );
printf(“enter a char in anycase”);
ch=getchar();
if(ch>=65 && ch<=90)
c1=ch+32;
else
if(ch>=97 && ch<=122)
c1=ch-32;
printf(“the given char in anothercase IS”);
putchar(c1);
getch();
}

C compiler: gcc 4.1.2

 Back to main directory: Sample C Program | Software Practical | Solved C Assignment


Get Free Programming Tutorials and Solved assignments