C - Storage Classes of Variables Questions and Answers

Practice Mode
Showing 10 of 33 questions
Q1
Storage class controls
  • A lifetime of a variable
  • B scope of a variable
  • C linkage of a variable
  • D all the above
Answer: Option D
Q2
Longevity of a variable refers to
  • A the duration for which the variable retains a given value during the execution of a program
  • B the portion of a program in which the variable may be visible.
  • C internal linkage of a variable
  • D external linkage of a variable.
Answer: Option A
Q3
scope of a variabe the refers to
  • A the duration for which the variable retains a given value during the execution of a program
  • B the portion of a program in which the variable may be visible.
  • C the value of the variable
  • D linkage of a variable.
Answer: Option B
Q4
A variable with external linkage refers to
  • A the duration for which the variable retains a given value during the execution of a program
  • B the same value for every occurence of that variable in a particular file.
  • C the same value in every source file where source program spans over multiple files.
  • D block scope.
Answer: Option C
Q5
A variable with internal linkage erfers to
  • A the duration for which the variable retains a given value during the execution of a program.
  • B the same value for every occurence of that variable in a particular file.
  • C the same value in every source file where source program spans over multiple files
  • D block scope.
Answer: Option B
Q6
A variable with no linkage refers to
  • A the duration for which the variable retains a given value during the execution of a program.
  • B the same value for every occurence of that variable in a particular file.
  • C the same value in every source file where source program spans over multiple files.
  • D block scope.
Answer: Option D
Q7
Which is not a storage class ?
  • A auto
  • B struct
  • C typedef
  • D static
Answer: Option B
Q8
The automatic storage class has
  • A temporary storage
  • B block scope
  • C persistent storage
  • D options a and b
Answer: Option D
Q9
The regiester storage class has
  • A temporary storage
  • B block scope
  • C persistent storage
  • D options a and b
Answer: Option D
Q10
The storage class type of internal static has
  • A persistent storage
  • B block scope
  • C file scope
  • D options a and b
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test