|
|
|
|
|
by shantnutiwari
1575 days ago
|
|
I came here to say this-- for many of the questions, the answer is Undefined Behaviour. The very 1st one-- I havent done embedded C for a long time, but the 1st thing I was taught was *not* to assume uninitialised variables would be set to 0. The author probably tested on a known safe (read lab like) system. >> can return what it wants or make demons fly out of your nose, Indeed, this is the correct answer. Most the questions on the page seem to be "Let's do weird crap highly dependent on the architecture/compiler, using undefined behaviour, and LOL, we can then blame C" And not defending C here at all, moved away from it years ago. But there are better criticisms than this |
|