I had this book "C Programming Language Second Edition" (Spanish version) for several years, I recently decided that I would do it. This will be my first programming language, and I know that it is not easy for beginners, I like problems. The thing, fortunately, I found an example of incorrect operation (see below) .
The following code should count and display a counter every time nc changes. the printf thing doesn't actually print anything. Changing the EOF to 1 and entering it will also not end.
#include <stdio.h> main() { long nc; nc = 0; while(getchar() != EOF) ++nc; printf("%ld\n", nc); }
Question: Should I be aware of any βrecentβ changes in C? . This book is from 1991, 20 years old ... (wow I'm getting old)
source share