Loading, please wait...

Functions in C Programming MCQ (Multiple Choice Questions And Answers)

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

11. Types of function in C language

  • Library Function
  • Both A and C
  • User defined function
  • None of the above

12. Assume the output of the following code:

#include <stdio.h>
    enum m{JAN, FEB, MAR};
    enum m foo();
    int main()
    {
        enum m i = foo();
        printf("%d\n", i);
    }
    int  foo()
    {
        return JAN;
    }
  • Compile time error
  • Runtime error
  • 1
  • 0

13. The function that actually created from a call to a template function is called

  • Generated
  • Inherited
  • Spawned
  • All of the above

14. what will be the output of the following code?

int myshow(int);

void main()
{
   int a=10;
   myshow(a);
   myshow(&a);
}

int myshow(int b)
{
    printf("Received %d, ", b);
}
  • Received 10, Received RANDOMNumber,
  • Received 10, Received 10,
  • Received 10, Received RANDOMNumber, with a compiler warning
  • None of the above

15. Point out the correct statement about call by reference

  • Pass By Value copies the variable value in one more memory location.
  • Pass By Value does not use Pointers.
  • Pass By Value protects your source or original variables from changes in outside functions or called functions.
  • All of the above