Advertisement
ultiprosan

Untitled

May 7th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1.     for (i = 0; i <= strlen(data); i++) {
  2.         fprintf(stdout, "\nS: %s\n", data+i);
  3.  
  4.         if (strncmp(data+i, " ", 1) == 0) {
  5.             printf("***Word!***\n");
  6.             words++;
  7.         }
  8.  
  9.         if (strncmp(data+i, "\n", 2) == 0) {
  10.             printf("***Newline!***\n");
  11.             lines++;
  12.             words++;
  13.         }
  14.  
  15.         if (strncmp(data+i, "\0", 2) == 0) {
  16.             printf("***Einde!***\n");
  17.             words++;
  18.         }
  19.  
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement