Hurry! Try our new Interactive Courses for FREE. 🥳   🚀

User-defined Functions in C Language

This Test will cover Function in C Langauge, including types of function, user-defined function, function with argument etc.
Q. What error would the following function give on compilation?
fun(int a, int b)
    int a = 20;
    return a;
Q. In C language all function except main() can be recursive?
Q. Which keyword is used to transfer control from a function back to the calling function?

Q. Which of the following statements are correct about the function?
int fun(int x)
    int r = 1;
        return 1;
        r = x * fun(x-1);
    return r;
Q. Functions cannot return more than one value at a time. True or False?
Q. Which of the following statement is true about a function with an argument?
Q. A function can be defined inside another function. True or False?

Q. Usually recursion works slower than loops. True or False?
Q. A variable declared inside a function without any specification is by default __________?
Q. __________ variable is initialized only once and remains into existence till the end of program?

Related Tests:

Explore more Subjects:

Tests for various other programming languages and subjects: