Friday, 6 March 2015

convert a single character from lower case to upper case

#include<stdio.h>
#include<conio.h>

void main()

{
char ch, con;

clrscr();

printf("Enter a Single Lower case Character")
scanf("%c",&ch);

printf("Your entered Single lower case character is= %c",ch);

con=ch-32;

printf ("After converting Upper case= %c",ch);

getch();

}


Output:

Enter a Single Lower case Character

a

Your entered Single lower case character is=a

After converting Upper case=A
 

1 comment: