C - Storage Classes of Variables Questions and Answers

Practice Mode
Showing 10 of 33 questions
Q21
External variable definition uses
  • A the keyword external
  • B the keyword extern
  • C no keyword
  • D the keyword auto
Answer: Option C
Q22
External variable requires
  • A declaration
  • B definition
  • C options a and b
  • D initialization only
Answer: Option C
Q23
If the definition of an external variable does not contain an initializer, it is known as
  • A forward declaration
  • B tentative definition
  • C backward reference
  • D backward definition
Answer: Option B
Q24
External variable definition
  • A creates the variable
  • B allocates memory
  • C does not use extern keyword
  • D all the above
Answer: Option D
Q25
External variable delaration
  • A does not allocate memory
  • B uses keyword extern
  • C cannot be initialized
  • D all the above
Answer: Option D
Q26
The data type that cannot be renamed by typedef is
  • A function
  • B pointer
  • C options a and b
  • D double
Answer: Option A
Q27
What are the valid C scopes of identifiers ?
  • A external and local
  • B project, file, and block
  • C global, file and local
  • D file and block
Answer: Option D
Q28
How is a variable accessed from another file ?
  • A The global variable is referenced via the global specifier.
  • B The global variable is referenced via the extern specifier.
  • C The global variable is referenced via the auto specifier.
  • D The global variable is referenced via the pointer specifier.
Answer: Option B
Q29
Which of the following is/are achieved using typedef facility ?
  • A increase the portability of code
  • B write more compact code
  • C only option b
  • D neither option a nor b
Answer: Option A
Q30
What does invoking the C compiler accomplish ?
  • A It links together object files.
  • B It creates machine code.
  • C Itonly provides code evaluation. You must use thelinker to assemble and link program.
  • D It interprets files at run-time.
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test