C-Storage Class Question and Answer

C-Storage Class Question and Answer
1. The area or scope of the variable depends on its
  • Data type
  • Storage class
  • System type
  • None of these
Show Answer
2. The storage class of a variable tells the compiler
  • The storage area of the variable
  • the default initial value of a variable
  • Life of the variable
  • All the above
Show Answer
3. Which variables can not be directly accessed by other functions ?
  • Auto
  • Static
  • Register
  • Extern
Show Answer
4. if float and double are defined wity type register the compiler treats them as
  • Auto variables
  • Static variables
  • Register variables
  • Extern variables
Show Answer
5. Find the odd one


  • Block scope
  • File scope
  • Local scope
  • Program scope
Show Answer
6. Which storage class manages memory efficientlly?
  • Static
  • Auto
  • Extern
  • Register
Show Answer
7. Which variable has no memory address ?
  • Auto
  • Register
  • Extern
  • Static
Show Answer
8. Find the output.
void main ( )
{
int static auto x;
x=5;
printf("5d", ++x);
x--;
printf ("%d", x);
}

  • Error: too many storage classes in declaration
  • 6 5
  • 6 6
  • None of these
Show Answer
9. Which storage class variables are created in stack?
  • Auto
  • Auto, static
  • Register, static
  • Extern, static
Show Answer
10. Whch of the following are created during execution time?
  • Auto & static variables
  • Register and static variables
  • All variables are created during compile time
  • Auto and register variables
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test