/* * This is txt2morse * Written by Bernhard Guillon under the terms of the GPL. */ #include int main() { int c; int zaehler = 0; while((c = getchar()) != EOF) { if(c == ' ') zaehler++; } printf("Anzahl der Leerzeichen: %d", zaehler); } poison@poison:~/c/txt2morse/0.0.0.1$ echo test test > test.txt poison@poison:~/c/txt2morse/0.0.0.1$ cat test.txt | txt2morse Anzahl der Leerzeichen: 1poison@poison:~/c/txt2morse/0.0.0.1$