Interesting quiz! One quick correction to the explanation section, which says "On machines where an int is 8 or 16 bits,...". The int type in C cannot be only 8-bit wide even on 8-bit CPU. This is because the C Standard says that "Basic signed integer type. Capable of containing at least the [−32,767, +32,767] range."
Good point I didn't know about
Well, I could understand the result if the quiz was written using "int", "unsigned int", "long" and "unsigned long" which are processor dipendent but every I looked it says that uint16_t is 2 bytes and uint32_t is 4 bytes regardless the processor. I am confused.
To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.
Please login (on the right) if you already have an account on this platform.
Otherwise, please use this form to register (free) an join one of the largest online community for Electrical/Embedded/DSP/FPGA/ML engineers: