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 2 of 39

Q11.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        static int x = 3;
        x++;
        if (x <= 5)
        {
            printf("hi");
            main();
        }
    }
Discuss
Answer: (d).hi hi
Discuss
Answer: (a).return-type function-name(argument type);
Q13.
Which of the following function declaration is illegal?
Discuss
Answer: (d).all of the mentioned
Discuss
Answer: (b).int sum(int a, int b) {return (a + b);}
Discuss
Answer: (c).No, C does not support it
Q16.
The value obtained in the function is given back to main by using ________ keyword?
Discuss
Answer: (a).return
Q17.
What is the return-type of the function sqrt() ?
Discuss
Answer: (c).double
Discuss
Answer: (d).None of the mentioned
Q19.
What is the output of this code having void return-type function?
#include <stdio.h>
    void foo()
    {
        return 1;
    }
    void main()
    {
        int x = 0;
        x = foo();
        printf("%d", x);
    }
Discuss
Answer: (d).Compile time error
Q20.
What will be the data type returned for the following function?
#include <stdio.h>
    int func()
    {
        return (double)(char)5.0;
    }
Discuss
Answer: (b).int
Page 2 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!