C-Storage Class Question and Answer

C-Storage Class Question and Answer
51. What is the storage class of function PRINT() and find the output?
void main ( )
{
auto PRINT();
PRINT();
}
PRINT ( )
printf('printing");
}


  • Auto, printing
  • Extern, printing
  • Static, printing
  • Compilation error
Show Answer
52. Find the output
void main ( )
{
tuypedef int float;
float x=4;7;
printf('%d", sizeof(x));
}

  • 4
  • 2
  • Compilation error
  • None of these
Show Answer
53. Find the output
void main ( )
{
extern i;
printf('%d\n",i);
{
nt i=20;
printf ('%d\n', i);
}
}

  • 20 20
  • Garbage 20
  • 0 20
  • Linker Error
Show Answer
54. To ver come the dangling pointer which of the following is used ?
  • Auto
  • Register
  • Static
  • Extern
Show Answer
55. Find the output
void main ( )
{
goto next;
{
int i=10;
static j=20;
next:printf('5d %d", i, j);
}

  • Garbage garbage
  • Garbage 20
  • Compile time error underdifined symbol
  • Run time error undefined symbol
Show Answer
56. Find the output
int main ( )
{
static int i=5;
if (-i--)
{
main ( );
printf('5d",i);
}
return (0);
}

  • 000000
  • -1-1-1-1-1
  • 54321
  • 543210
Show Answer
57. Find the output.
#define max 5typedef int arr1[max];
void main ( )
{
typedef char arr2{max];
arr1 list [2] ={0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
arr2 name [ ] ={"name"};
printf("%d %s", list [1], name);
}


  • Garbage name
  • 1 name
  • 5 name
  • Compilation error
Show Answer
58. Find the output
void main ( )
{
register int a=5;
register int *b=&a;
printf("%d %d", a, *b);
}

  • 5 5
  • Garbage value
  • Compilation error
  • None of the above
Show Answer
59. Storage class to be allocated to the object during
  • Declaration
  • Definition
  • Compilation
  • Execution
Show Answer
60. Pointer can't work with which storage class ?
  • Auto
  • Register
  • Extern
  • Static
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test