Storage Class Questions and Answers

Practice Mode
Showing 10 of 97 questions
Q41
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; }
  • A B
  • B C
  • C Garbage
  • D Compilation error
Answer: Option B
Q42
Find the output void main ( ) { char *p='CITE"; char *q; q=(char *) malloc (strlen(p)); while (*q++); printf("%s", q); }
  • A CITE
  • B ITE
  • C NULL
  • D None of these
Answer: Option D
Q43
To access a semi-global variable
  • A Auto is used
  • B Register is used
  • C Extern is used
  • D Static is used
Answer: Option C
Q44
Find the output. int i=4; void main ( ) { int i=1; { sttic int i=5; } printf('5d', i); }
  • A 4
  • B 1
  • C 5
  • D 0
Answer: Option B
Q45
Which storage class allocates and deallocates memory without the knowledge of user?
  • A Auto
  • B Register
  • C Static
  • D Extern
Answer: Option A
Q46
Which storage class share memory into different frames of the function recursion ?
  • A Auto
  • B Static
  • C Register
  • D Extern
Answer: Option B
Q47
External variable can not be initialized, because
  • A It is a variable declaration
  • B It is a run time variable
  • C It is variable definition
  • D None of these
Answer: Option A
Q48
Which register holds base address of code segment ?
  • A CS
  • B DS
  • C ES
  • D SS
Answer: Option A
Q49
Find the  output void main ( ) { int const * size=10; printf('5d", ++size); }
  • A 10
  • B 11
  • C 12
  • D Compilation error
Answer: Option C
Q50
What are the allowed storage class in function prototype declaration ?
  • A Static
  • B Extern
  • C Register
  • D Both a and b
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test