Which statement sets bit n of an unsigned integer x to 1 and leaves the other bits unchanged?
Correct answer D. x |= 1u << n;
Subject / 929 questions
Page 3 of Programming multiple-choice questions with answers. Tap an option to check yourself.
Page 3 of 47
Correct answer D. x |= 1u << n;
Correct answer D. 32
Correct answer C. The result is implementation-defined
Correct answer C. 9
Correct answer C. 5
Correct answer B. 1012
Correct answer A. The pointer p itself, which cannot be made to point elsewhere
Correct answer D. 1 5
Correct answer D. int (*pf)(int, int);
Correct answer D. 12
Correct answer B. BC
Correct answer C. An expression of integer type, such as int, char or an enum
Correct answer B. 43210
Correct answer C. 3
Correct answer D. no 0
Correct answer A. Anywhere in the same function as the goto
Correct answer D. 10
Correct answer C. Zero
Correct answer C. It declares count without defining it, so the storage must be defined elsewhere
Correct answer D. Taking its address with the & operator