Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (i = 0; i <= strlen(data); i++) {
- fprintf(stdout, "\nS: %s\n", data+i);
- if (strncmp(data+i, " ", 1) == 0) {
- printf("***Word!***\n");
- words++;
- }
- if (strncmp(data+i, "\n", 2) == 0) {
- printf("***Newline!***\n");
- lines++;
- words++;
- }
- if (strncmp(data+i, "\0", 2) == 0) {
- printf("***Einde!***\n");
- words++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement