Questions

















- Correct


























- Undefine behavior correct
















- Answer: c




- Answer: c - talking about linkage



















- Variable shadowing













- j=7



- misleading indentation







- data segment


















































































- short circuiting






















- don’t need cast actually
































Trivia
- ASCII value of
A = 65andZ = 90 - ASCII value of
a = 97andz = 122 >>right shift = floor divide by 2
<<left shift = multiply by 2
- ternary operator is right-associative

printfreturn value - number of characters transmitted to the output stream or negative value if an output error or an encoding error (for string and character conversion specifiers) occurred.

#define identifier replacement-list (optional)









- before arithmetic operations are performed, “narrow integers” (like
charandshort int) are subject to integer promotions 


- In C, all uninitialized global and static variables are stored in the BSS segment (Block Started by Symbol), and all initialized global and static variables are stored in the data segment.

- WRONG! a pointer variable needs to point to an object not to a literal

- When an
unsignedtype is compared with asignedtype in C, thesignedoperand is implicitly converted to theunsignedtype before the comparison is made - String literals in C are typically stored in read-only memory. This means their contents are not intended to be changed during program execution
- precision quantifies the amount of detail a floating-point type can hold (e.g., number of significant digits or mantissa bits), while accuracy reflects how close a floating-point value or computation is to its true mathematical counterpart, acknowledging the inherent approximations and limitations of floating-point arithmetic
