C - Storage Classes of Variables Questions and Answers

Take Exam

C Storage Classes of Variables MCQ questions with answers focus on auto, static, extern, and register storage classes. Understanding these concepts is essential for mastering memory management and variable scope in C programming. These programming questions and answers are frequently asked in interviews and placement exams conducted by Wipro, TCS, and Infosys. Practicing MCQs on C storage classes helps improve your grasp of variable lifetime, linkage, and accessibility. Download the C programming MCQ PDF and attempt online practice tests to build a strong foundation in variable management.

C - Storage Classes of Variables

Showing 10 of 33 questions

21. External variable definition uses

  • the keyword external
  • the keyword extern
  • no keyword
  • the keyword auto
Show Answer Report

22. External variable requires

  • declaration
  • definition
  • options a and b
  • initialization only
Show Answer Report

23. If the definition of an external variable does not contain an initializer, it is known as

  • forward declaration
  • tentative definition
  • backward reference
  • backward definition
Show Answer Report

24. External variable definition

  • creates the variable
  • allocates memory
  • does not use extern keyword
  • all the above
Show Answer Report

25. External variable delaration

  • does not allocate memory
  • uses keyword extern
  • cannot be initialized
  • all the above
Show Answer Report

26. The data type that cannot be renamed by typedef is

  • function
  • pointer
  • options a and b
  • double
Show Answer Report

27. What are the valid C scopes of identifiers ?

  • external and local
  • project, file, and block
  • global, file and local
  • file and block
Show Answer Report

28. How is a variable accessed from another file ?

  • The global variable is referenced via the global specifier.
  • The global variable is referenced via the extern specifier.
  • The global variable is referenced via the auto specifier.
  • The global variable is referenced via the pointer specifier.
Show Answer Report

29. Which of the following is/are achieved using typedef facility ?

  • increase the portability of code
  • write more compact code
  • only option b
  • neither option a nor b
Show Answer Report

30. What does invoking the C compiler accomplish ?

  • It links together object files.
  • It creates machine code.
  • Itonly provides code evaluation. You must use thelinker to assemble and link program.
  • It interprets files at run-time.
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test