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 208easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 3;
{
x = 4;
printf("%d", x);
}
}Question 209easy
Property which allows to produce different executable for different platforms in C is called?
Question 210easy
Which of the following file extensions are accepted with #include?
Advertisement
Question 211easy
Which variable has the longest scope in the following C code?
#include <stdio.h>
int b;
int main()
{
int c;
return 0;
}
int a;Question 212easy
Which of the following sequences are unaccepted in C language?
Question 213easy
Comment on the output of the following C code.
#include <stdio.h>
int main()
{
int i;
for (i = 0;i < 5; i++)
int a = i;
printf("%d", a);
}Advertisement
Question 214easy
What will be the output of the following C code?
#include <stdio.h>
void foo();
int main()
{
void foo(int);
foo();
return 0;
}
void foo()
{
printf("2 ");
}Question 215easy
What will be the output of the following C code?
#include <stdio.h>
int x = 5;
void main()
{
int x = 3;
printf("%d", x);
{
int x = 4;
}
printf("%d", x);
}Question 216easy
What will be the output of the following C code?
#include <stdio.h>
#define MIN 0
#if defined(MIN) - (!defined(MAX))
#define MAX 10
#endif
int main()
{
printf("%d %d\n", MAX, MIN);
return 0;
}