Question 76
Which of the following are valid storage class specifiers in standard C?
Detailed Solution
auto, register, static, and extern are all valid storage class specifiers in C.
Which of the following are valid storage class specifiers in standard C?
auto, register, static, and extern are all valid storage class specifiers in C.
Which of the following expressions evaluate to 1 (true) in C?
5 > 3 is true (1). !0 is true (1). 10 && 20 is true (1). 0 || 0 is false (0).
Which of the following bitwise operations can be used to check if an integer 'n' is odd?
(n & 1) == 1 checks if LSB is set. (n % 2) != 0 checks non-zero remainder. (n | 1) == n holds for odd numbers. n ^ 1 toggles LSB instead of testing it.
Which of the following statements about static functions in C are TRUE?
Static functions possess internal linkage restricting visibility to their source file. They accept parameters normally and behave as standard functions otherwise.
Which of the following operations are valid on pointers in C?
Pointer addition with integer, pointer subtraction, and pointer comparison are valid. Adding two pointers together (p1 + p2) is illegal in C.