All pastes #767810 Raw Edit

Unnamed

public c v1 · immutable
·published 2007-11-10 01:46 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;        if (grab == ' ')                ++blank;        if (grab == '\n')                ++new;printf(" %d tabs\n %d spaces\n %d new lines\n", tab, blank, new); } /* prints results */return 0;}