Function MCQs
Practice free Function multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 223 questions — no login required.
Question 64easy
What is the scope of an automatic variable?
Question 65easy
What will be the output of the following C code having void return-type function?
#include <stdio.h>
void foo()
{
return 1;
}
void main()
{
int x = 0;
x = foo();
printf("%d", x);
}Question 66easy
If the file name is enclosed in double quotation marks, then . . . . . . . .
Advertisement
Question 67easy
What will be the output of the following C code?
#include <stdio.h>
void foo();
int main()
{
void foo();
foo();
return 0;
}
void foo()
{
printf("2 ");
}Question 68easy
Which of the following storage class supports char data type?
Question 69easy
register keyword mandates compiler to place it in machine register.
Advertisement
Question 70easy
What will be the output of the following C code?
#include <stdio.h>
#define SYSTEM 20
int main()
{
int a = 20;
#if SYSTEM == a
printf("HELLO ");
#endif
#if SYSTEM == 20
printf("WORLD\n");
#endif
}Question 71easy
Functions have static qualifier for its declaration by default.
Question 72easy
Can we use a function as a parameter of another function? [Eg: void wow(int func())].