LearnFrenzy
Sign in Take a free test

C Variables · Exercise 1 of 4

C Variables Variables MCQ

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

Twelve multiple-choice questions on naming, initialisation, scope, lifetime, linkage and the storage classes – including thread_local and C23 auto. Pick an option to check your answer instantly.

Question 11 Hard

What does thread_local int errors; declare (C23; _Thread_local in C11)?

A A variable shared by all threads
B A variable of which each thread has its own separate copy
C A variable that only the main thread can use
D A constant
Question page & discussion
Question 12 Medium

In C23, what is the type of x in auto x = 2.5f;?

A int
B float
C double
D auto is only a storage class, so this is an error
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