How to write a C Program Character in C Programming Language ?
Solution For C Program :
/*C Program Character.*/
#include <stdio.h>
#include <ctype.h>
int main(){
char a;
// Type the characters
// (1) a = getchar();
// (2)
scanf("%c", &a);
/*
(1)
if( a >= 'a' && a <= 'z' ){
a -= ('a'-'A'); // a -= 32;
}
(2)
if( islower(a) ){
a -= ('a'-'A'); // a -= 32;
}
(3)
*/
a = toupper(a);
// Output character
// (1) putchar(a);
// (2)
printf("%c", a);
return 0;
}
Another Example of Character Using C :
#include <stdio.h>
int main(){
char c;
// c = getchar();
scanf("%c", &c);
//putchar(c);
printf("%c", c);
// printf("%d", c);
return 0;
}
Program related to C Programming Language :
- C Program Array Index Example
- C Program String - Alphabet Count Example
- C Program Character toupper() Example
- C Program Array Example: Average
- C Program Array Example: Reverse
- C Program if - while - for Example
- C Program Switch - Case Example
- C Program 0.1 + 0.2 != 0.3 Solved
- C Program if - else if - else Example
- C Program typedef Example
- C Program scanf & gets Example
- C Program Friend & Operator: Point2D Example
- C Program Friend & Operator: Vector Example
- C Program Recursion Example
- C Program File Input & Output Example
- C Program Structure Example-2
- C Program Structure Example
- C Program Pointer Example
- C Program Function Example
- C Program String Example
- C Program String Count Example
- C Program String Example
- C Program Character Example
- C Program Sort Example
- C Program sizeof & memcpy Example
- C Program Array Example
- C Program to Array
- C Program print fill zero & mod/div
- C Program Double, Float Equal
- C Program nested for
- C Program for
- C Program if
- C Program System
- C Program Operation
- C Program to printf & scanf
- Example C Program Cuda Malloc
- C Program Side Length
Learn More :
Example
- C Program String - Alphabet Count Example
- C Program Array Example: Average
- C Program Array Example: Reverse
- C Program Switch - Case Example
- C Program if - else if - else Example
- C Program Friend & Operator: Point2D Example
- C Program Friend & Operator: Vector Example
- C Program Recursion Example
- C Program Structure Example-2
- C Program Structure Example
- C Program Pointer Example
- C Program Function Example
- C Program String Example
- C Program sizeof & memcpy Example
- C Program Array Example
- C Program Side Length Example
- C Program Pipes()
- C Program 0-1000 to Ordinary
- C Program Roboturtle
- C Program to Destroys a Mailbox
- C Program to Destroys a semaphore
- C Code for Testing the pH Meter V1.0
- APA 102c test program
- How To Retarget the C Library printf function to the UART.
Characters
- C Program Character toupper() Example
- C Program To Print Lines Of A Paragraph Having More Than 15 Characters
- C Program To Copy One Character Array Into Another
- C Program to Print ASCII equivalent of a character until terminated by key is ‘x’
- C Program to find the number of unique characters
- Printing ASCII Table with Numbers and corresponding characters
- C Program to Compare Two Character
- Design a C function that shortens a string to 8 characters
- Menu driven program in C which performs the following operations on strings
- File Handling (console to file) in C Program