c-programming

Simple C programs
git clone git://git.laack.co/c-programming.git
Log | Files | Refs

count-characters.c (161B)


      1 #include <stdio.h>
      2 int main(){
      3     unsigned long itr = 0;
      4     char c;
      5 
      6     while((c = getchar()) != EOF){
      7         itr += 1;
      8     }
      9 
     10     printf("\n%ld\n", itr);
     11 }