All pastes #767847 Raw Edit

Unnamed

public c v1 · immutable
·published 2007-11-10 02:16 UTC
rendered paste body
#include <stdio.h>/* program to count number of tabs, blank spaces, and new line characters (\t, , \n). */main() {int grab, tab, blank, new;tab = blank = new = 0;  /* sets all values to zero */printf("counts some obscure characters.\n");while((grab = getchar()) != EOF) { /* suspected errorious code \/ */        if (grab == '\t') {                ++tab;        }        else if (grab == ' ') { /* if the character is a tab, it is NOT a blank; no point in processing another if */                ++blank;        }        else if (grab == '\n') { /* if it is a tab or a blank, it is NOT a newline */                ++new;        }}printf("%d tabs, %d spaces, %d new lines\nBaud is dumb for ignoring when I pasted this the first time\n", tabs, spaces, new);return 0;}