C Questions and Answers
kukuruku.co
C Questions and Answers
1–10 of 135 posts
Re: C Questions and Answers
#2Re: C Questions and Answers
#3This reminds me of tests I took in earlier CS classes. Knowing those things are utterly useless in practice.
Re: C Questions and Answers
#45 is also missing a check for a NULL pointer. ;)
Most of there rules are unfortunately ignored, as obscure information. The worst offender I see in wild code is 5.
The second most ignored is not checking values before computation: 10, 11, 12.
No.7 is very interesting, rarely violated, most programmers don't even know that is a thing or just assume the processor won't trap on an unaligned read.
Re: C Questions and Answers
#5He succeeded in convincing me that he does not know C!
Re: C Questions and Answers
#6He's discussing subtle points of the C language and yet there is no mention of which compiler he's using, whether the results might be different for different compilers, hardware platforms, and how they correlate with multiple C standards (C89, C99, C11/C1X, etc). He succeeded in convincing me that he does not know C!
>and how they correlate with multiple C standards
There's nothing going on here specific to any particular revision of ISO C (that I can see).
Re: C Questions and Answers
#7Re: C Questions and Answers
#8This reminds me of tests I took in earlier CS classes. Knowing those things are utterly useless in practice.