In this program user asks to text conversion from Lower case to uppercase. User declares the char type variable. User also uses the loop statement that will execute the concept of conversion. The other function for put char that has to get the character that converted. In the end the display the result on the screen as well.
Problem statement:
This is C program that asks the user to covert the lower case character into upper case.
- Declaring the variables.
- Using conversion method.
- Display result on the screen.
Here is C source code for Converting the Character into Uppercase from lowercase. The output of this program shown below.
#include <stdio.h>
#include <ctype.h>
void main( )
{
char letter [80] ;
int count, tag;
clrscr();
for (count = 0; ( letter [ count ] = getchar()) != '\n' ; ++count)
tag = count;
for (count = 0; count < tag; ++count)
putchar(toupper(letter[count]));
getch();
}
Output :
hello dinesh
HELLO DINESH