Storage Class Questions and Answers

Practice Mode
Showing 10 of 97 questions
Q1
The area or scope of the variable depends on its
  • A Data type
  • B Storage class
  • C System type
  • D None of these
Answer: Option B
Q2
The storage class of a variable tells the compiler
  • A The storage area of the variable
  • B the default initial value of a variable
  • C Life of the variable
  • D All the above
Answer: Option D
Q3
Which variables can not be directly accessed by other functions ?
  • A Auto
  • B Static
  • C Register
  • D Extern
Answer: Option A
Q4
if float and double are defined wity type register the compiler treats them as
  • A Auto variables
  • B Static variables
  • C Register variables
  • D Extern variables
Answer: Option A
Q5
Find the odd one
  • A Block scope
  • B File scope
  • C Local scope
  • D Program scope
Answer: Option C
Q6
Which storage class manages memory efficientlly?
  • A Static
  • B Auto
  • C Extern
  • D Register
Answer: Option B
Q7
Which variable has no memory address ?
  • A Auto
  • B Register
  • C Extern
  • D Static
Answer: Option B
Q8
Find the output. void main ( ) { int static auto x; x=5; printf("5d", ++x); x--; printf ("%d", x); }
  • A Error: too many storage classes in declaration
  • B 6 5
  • C 6 6
  • D None of these
Answer: Option A
Q9
Which storage class variables are created in stack?
  • A Auto
  • B Auto, static
  • C Register, static
  • D Extern, static
Answer: Option A
Q10
Whch of the following are created during execution time?
  • A Auto & static variables
  • B Register and static variables
  • C All variables are created during compile time
  • D Auto and register variables
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test