C-Storage Class Question and Answer

C-Storage Class Question and Answer
41. Find the output
void man ( )
{
har *p;
char (show( );
p=show ( );
printf('%c", *p;
}
char *show()
{
char *m;
m=(char *p) malloc(1);
*m='b';
++*m;
return m;
}

  • B
  • C
  • Garbage
  • Compilation error
Show Answer
42. Find the output
void main ( )
{
char *p='CITE";
char *q;
q=(char *) malloc (strlen(p));
while (*q++);
printf("%s", q);
}

  • CITE
  • ITE
  • NULL
  • None of these
Show Answer
43. To access a semi-global variable
  • Auto is used
  • Register is used
  • Extern is used
  • Static is used
Show Answer
44. Find the output.
int i=4;
void main ( )
{
int i=1;
{
sttic int i=5;
}
printf('5d', i);
}

  • 4
  • 1
  • 5
  • 0
Show Answer
45. Which storage class allocates and deallocates memory without the knowledge of user?
  • Auto
  • Register
  • Static
  • Extern
Show Answer
46. Which storage class share memory into different frames of the function recursion ?
  • Auto
  • Static
  • Register
  • Extern
Show Answer
47. External variable can not be initialized, because
  • It is a variable declaration
  • It is a run time variable
  • It is variable definition
  • None of these
Show Answer
48. Which register holds base address of code segment ?
  • CS
  • DS
  • ES
  • SS
Show Answer
49. Find the  output
void main ( )
{
int const * size=10;
printf('5d", ++size);
}

  • 10
  • 11
  • 12
  • Compilation error
Show Answer
50. What are the allowed storage class in function prototype declaration ?
  • Static
  • Extern
  • Register
  • Both a and b
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test