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 

21. A function can make

  • One throw only
  • One throw of each programmerdefined type
  • One throw of each scale type
  • As many throws of as many types as necessary

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

#include <stdio.h>
    void foo()
    {
        return 1;
    }
    void main()
    {
        int x = 0;
        x = foo();
        printf("%d", x);
    }
  • Runtime error
  • Compile Time error
  • 0
  • 1

23. Assume the output of the following code:

int myshow(int *);

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

int myshow(int *k)
{
    printf("Received %d, ", *k);
}
  • Received 10,
  • Received RANDOMNumber,
  • 10
  • None of the above

24. Assume the output of the following code:

enum m{JAN, FEB, MAR};
    enum m foo();
    int main()
    {
        enum m i = foo();
        printf("%d\n", i);
    }
    int  foo()
    {
        return JAN;
    }
  • Runtime error
  • JAN
  • Compile time error
  • JAN FEB MAR

25. Assume the output of the following code:

int x; 
void main() 
{ 
printf("%d", x); 
}
  • Runtime error
  • 0
  • Junk Value
  • Compile time error