LearnFrenzy
Sign in Take a free test

C Const · Exercise 1 of 4

C Const const MCQ

  • 12 questions
  • Page 2 of 2
  • Answers explained
0Attempted
0Correct
0Wrong
Directions

Twelve multiple-choice questions on const variables, const with pointers, const parameters, const vs #define, casting away const, volatile const and C23 constexpr. Pick an option to check your answer instantly.

Question 11 Hard

What does volatile const uint32_t *status describe?

A A contradiction that does not compile
B Data the program must not write but that can change on its own, so every read must really access it
C A constant that is cached
D A pointer that cannot move
Question page & discussion
Question 12 Medium

In C23, which use is valid for constexpr int N = 8; that is not valid for const int N = 8;?

A Reading N in printf
B Using N as a case label or a global array size
C Taking its address
D Passing it to a function
Question page & discussion
Up next · Exercise 2Predict the Output12 questions

Ready to test your Programming?

Timed online tests with instant scores and explanations.

Search LearnFrenzy

Esc

Quick links