Function MCQs

223 questionsC-ProgramPage 20 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 172easy
What will be the x in the following C code?
#include <stdio.h>
void main()
{
    int x;
}
Question 173easy
What linkage does automatic variables have?
Question 174easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
   printf("%d", d++);
}
int d = 10;
Advertisement
Question 175easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    void foo(), f();
    f();
}
void foo()
{
    printf("2 ");
}
void f()
{
    printf("1 ");
    foo();
}
Question 176easy
Which of the following names for files not accepted?
Question 177easy
If #include is used with file name in angular brackets.
Advertisement
Question 178easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    m();
    void m()
    {
        printf("hi");
    }
}
Question 179easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    void foo();
    printf("1 ");
    foo();
}
void foo()
{
    printf("2 ");
}
Question 180easy
What will be the output of the following C code?
#include <stdio.h>
static int x = 5;
void main()
{
    int x = 9;
    {
        x = 4;
    }
    printf("%d", x);
}