C- Functions Question and Answer

C- Functions Question and Answer
81. size of a function is known as
  • Function call
  • function Recursion
  • function Frame
  • Function prototype
Show Answer
82. Return value of a funtion stores in
  • Stack area
  • Data area
  • Code area
  • Heap area
Show Answer
83. Any function return value is stored in which register.
  • CX
  • CS
  • DS
  • AX
Show Answer
84. Find the output
void main ( )
{
int x=10, y=20, p,q;
p=add (x,y);
q=add (x,y);
printf("%d %d", p,q);
}
add (int a, int b)
{
a+=a; b+=b;
return (a);
return (b);
}

  • 10 10
  • 20 20
  • 10 20
  • 20 10
Show Answer
85. Forward communication is only possible through
  • Pass by value
  • Pass by address
  • Return type
  • Both a and b
Show Answer
86. storage class of a function is defined when
  • Function prototype is declared
  • Function body is defined
  • Function call
  • None of these
Show Answer
87. Find the output
void main ()
{
int x=5, y=6;
change (&x, &y);
prrintf("%d %d", x,y);
}
change (int *x, int *y)
{
int temp=1;
temp^=*x;
*x^=*y;
*y^=temp;
}


  • 5 6
  • 6 5
  • 3 2
  • None of these
Show Answer
88. Find the output
void main ()
{
int i=2;
printf("%d", see (i));
}
see (i)
{
return i*i;
}

  • Compilation error
  • 2
  • 4
  • None of these
Show Answer
89. Which of the following is true?
  • Nested function call is allowed in C.
  • The functions should be called in the order of their definitions in the source code.
  • C follows bottom-up modular approach.
  • A function name can begin with an underscore
Show Answer
90. Find the output
void main ()
{
int x[5];
see (x);
printf("%d", x[2]);
}
see (int x[ ] )
{
x++;
x[1]=100;
}

  • 100
  • 0
  • Garbage
  • None of these
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test