Function MCQs

223 questionsC-ProgramPage 21 of 25

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 181easy
Which of the following cannot be static in C?
Question 182easy
#include statement must be written . . . . . . . .
Question 183easy
A local variable declaration with no storage class specified is by default . . . . . . . .
Advertisement
Question 184easy
What is the problem in the following C declarations?
int func(int);
double func(int);
int func(float);
Question 185easy
Is initialisation mandatory for local static variables?
Question 186easy
Which of the following function declaration is illegal?
Advertisement
Question 187easy
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);
}
Question 188easy
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;
}
Question 189easy
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;
}
Function MCQs with Answers & Solutions — C-Program | GrabStudy