81. Which of the following cannot be static in C?
82. #include statement must be written . . . . . . . .
83. A local variable declaration with no storage class specified is by default . . . . . . . .
84. What is the problem in the following C declarations?
int func(int);
double func(int);
int func(float);
int func(int);
double func(int);
int func(float);
85. Is initialisation mandatory for local static variables?
86. Which of the following function declaration is illegal?
87. What will be the output of the following C code?
#include <stdio.h>
#define A 1 + 2
#define B 3 + 4
int main()
{
int var = A * B;
printf("%d\n", var);
}
#include <stdio.h>
#define A 1 + 2
#define B 3 + 4
int main()
{
int var = A * B;
printf("%d\n", var);
}
88. What will be the output of the following C code?
#include <stdio.h>
double foo();
int main()
{
foo();
return 0;
}
foo()
{
printf("2 ");
return 2;
}
#include <stdio.h>
double foo();
int main()
{
foo();
return 0;
}
foo()
{
printf("2 ");
return 2;
}
89. What will be the output of the following C code?
#include <stdio.h>
#define foo(x, y) x / y + x
int main()
{
int i = -6, j = 3;
printf("%d ", foo(i + j, 3));
printf("%d\n", foo(-3, 3));
return 0;
}
#include <stdio.h>
#define foo(x, y) x / y + x
int main()
{
int i = -6, j = 3;
printf("%d ", foo(i + j, 3));
printf("%d\n", foo(-3, 3));
return 0;
}
90. 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);
}
#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);
}
Read More Section(Function)
Each Section contains maximum 100 MCQs question on Function. To get more questions visit other sections.