C examples for Data Type:char
Outputs a single character
#include <stdio.h> #include <string.h> int main()/*from w w w . j av a 2 s. co m*/ { int i; char msg[] = "book2s.com"; for (i = 0; i < strlen(msg); i++) { putchar(msg[i]); //Outputs a single character } putchar('\n'); // One line break after the loop is done. return(0); }