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 127easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
register int x;
printf("%d", x);
}Question 128easy
What is the return-type of the function sqrt()?
Question 129easy
Can function definition be present in header files?
Advertisement
Question 130easy
What will be the output of the following C code?
#include <stdio.h>
double i;
int main()
{
printf("%g\n",i);
return 0;
}Question 131easy
Comment on the following 2 C programs.
#include <stdio.h> //Program 1
int main()
{
int a;
int b;
int c;
}
#include <stdio.h> //Program 2
int main()
{
int a;
{
int b;
}
{
int c;
}
}Question 132easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
static int x;
printf("x is %d", x);
}Advertisement
Question 133easy
#include are . . . . . . . . files and #include "somefile.h" . . . . . . . . files.
Question 134easy
What will be the output of the following C code snippet?
#include (stdio.h)
void main()
{
printf("hello");
}Question 135easy
What will be the output of the following C code?
#include <stdio.h>
#define foo(m, n) m ## n
void myfunc();
int main()
{
myfunc();
}
void myfunc()
{
printf("%d\n", foo(2, 3));
}