C examples for Data Type:char
Count characters in input with for loop
#include <stdio.h> int main() /*from ww w. j a va2 s. c om*/ { double nc; for (nc = 0; getchar() != EOF; ++nc) ; printf("%.0f\n", nc); }