C examples for Data Type:char
Here's an example of an arithmetic operation with a value of type char:
#include <stdio.h> int main(void) { char letter = 'C'; // letter contains the decimal code value 67 /*ww w.j av a 2s .c om*/ printf("The character is %c\n", letter); letter = letter + 3; // letter now contains 70, which is 'F' printf("The character is %c\n", letter); return 0; }