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 190easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
foo();
foo();
}
void foo()
{
int i = 11;
printf("%d ", i);
static int j = 12;
j = j + 1;
printf("%d\n", j);
}Question 191easy
What will be the output of the following C code?
#include <stdio.h>
register int x;
void main()
{
printf("%d", x);
}Question 192easy
Functions can return structure in C?
Advertisement
Question 193easy
What is the advantage of #define over const?
Question 194easy
What is the default return type if it is not specified in function definition?
Question 195easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
void foo();
void f()
{
foo();
}
f();
}
void foo()
{
printf("2 ");
}Advertisement
Question 196easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
m();
printf("%d", x);
}
int x;
void m()
{
x = 4;
}Question 197easy
Functions in C are always . . . . . . . .
Question 198easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
register static int i = 10;
i = 11;
printf("%d\n", i);
}