Function MCQs

223 questionsC-ProgramPage 19 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 163easy
What is #include ?
Question 164easy
If storage class is not specified for a local variable, then the default class will be auto.
Question 165easy
What will be the output of the following C code?
#include <stdio.h>
int x = 5;
void main()
{
    int x = 3;
    m();
    printf("%d", x);
}
void m()
{
    x = 8;
    n();
}
void n()
{
    printf("%d", x);
}
Advertisement
Question 166easy
What will be the output of the following C code (without linking the source file in which ary1 is defined)?
#include <stdio.h>
int main()
{
    extern ary1[];
    printf("scope rules\n");
}
Question 167easy
What will be the output of the following C code?
#include <stdio.h>
static int x;
void main()
{
    int x;
    printf("x is %d", x);
}
Question 168easy
Which of the following is a correct format for declaration of function?
Advertisement
Question 169easy
Automatic variables are allocated space in the form of a . . . . . . . .
Question 170easy
The value obtained in the function is given back to main by using . . . . . . . . keyword.
Question 171easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    auto i = 10;
    const auto int *p = &i
    printf("%d\n", i);
}