C-Storage Class Question and Answer

C-Storage Class Question and Answer
31. Find the output
main ( )
{
show ( );
show ( );
}
int show ( )
{
static int a=5;
a++;
printf("5d", a);
}

  • 5 5
  • 6 6
  • 5 6
  • 6 7
Show Answer
32. Which of the following storage class creates a block scoping ?
  • Auto
  • Register
  • Static
  • Extern
Show Answer
33. Find the output.
void main ( )
{
int x;
#include<stdio.h>
x=printf("clrscr ( )");
printf('5d", x);
}
  • c1rscr()8
  • c1rscr()
  • Run time error
  • Compile time error
Show Answer
34. Writing static to a global variable means
  • The variable is only visible to that file
  • The variable is only visible to other file
  • The variable is only visible to all file
  • None of these
Show Answer
35. Which of the following is not decided by storage class ?
  • Storage
  • Life
  • Address
  • Scope
Show Answer
36. The storage class which has no storage, life, initial value, scope and linkage is
  • Auto
  • Register
  • Extern
  • Typedef
Show Answer
37. The storage class which creates new name of the data type
  • Auto
  • Register
  • Extern
  • Typedef
Show Answer
38. Find the output
main ( )
{
show ( );
show ( );
}
int show ( )
{
extern int a;
a++;
printf('%d", a);
}
int a=5;
}

  • 5 5
  • 6 6
  • 5 6
  • 6 7
Show Answer
39. Find the output
int a=20;
void main ()
{
int a=5;
{
int a=10;
}
printf("5d", a);
}

  • 20
  • 5
  • 10
  • None of these
Show Answer
40. Which of the storage class allocates memory in run time ?
  • Auto
  • Register
  • Static
  • Extern
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test