adplus-dvertising

Welcome to the Functions MCQs Page

Dive deep into the fascinating world of Functions with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Functions, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Functions, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Functions. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Functions. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Functions MCQs | Page 1 of 39

Q1.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        void foo();
        printf("1 ");
        foo();
    }
    void foo()
    {
        printf("2 ");
    }
Discuss
Answer: (a).1 2
Q2.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        void foo(), f();
        f();
    }
    void foo()
    {
        printf("2 ");
    }
    void f()
    {
        printf("1 ");
        foo();
    }
Discuss
Answer: (b).1 2
Q3.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        void foo();
        void f()
        {
            foo();
        }
        f();
    }
    void foo()
    {
        printf("2 ");
    }
Discuss
Answer: (d).Depends on the compiler
Q4.
What is the output of this C code?
#include <stdio.h>
    void foo();
    int main()
    {
        void foo();
        foo();
        return 0;
    }
    void foo()
    {
        printf("2 ");
    }
Discuss
Answer: (b).2
Q5.
What is the output of this C code?
#include <stdio.h>
    void foo();
    int main()
    {
        void foo(int);
        foo(1);
        return 0;
    }
    void foo(int i)
    {
        printf("2 ");
    }
Discuss
Answer: (a).2
Q6.
What is the output of this C code?
#include <stdio.h>
    void foo();
    int main()
    {
        void foo(int);
        foo();
        return 0;
    }
    void foo()
    {
        printf("2 ");
    }
Discuss
Answer: (b).Compile time error
Q7.
What is the output of this C code?

include <stdio.h>
void m()
{
printf("hi");
}
void main()
{
m();
}
Discuss
Answer: (a).hi
Q8.
What is the output of this C code?
#include <stdio.h>
    void m();
    void n()
    {
        m();
    }
    void main()
    {
        void m()
        {
            printf("hi");
        }
    }
Discuss
Answer: (b).Compile time error
Q9.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        m();
        void m()
        {
            printf("hi");
        }
    }
Discuss
Answer: (b).Compile time error
Q10.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        m();
    }
    void m()
    {
        printf("hi");
        m();
    }
Discuss
Answer: (c).Infinite hi
Page 1 of 39

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!