Function in C MCQs Exercise I

Ques 1 Function


A function declaration tells about the _______

A function's name
B return type
C parameters
D All of these

Ques 2 Function


Which of the following is not a Library function?

A string( )
B strrev( )
C strcat( )
D None of these

Ques 3 Function


Consider the following C function

int f(int n)
{
    static int r=0;
    if(n<=0) return 1;
    if(n>3)
    {
        r=n;
        return f(n-2)+2;
    }
    return f(n-1)+r;
}

What is the value of f(5)?

A 5
B 7
C 9
D 18

Ques 4 Function


The execution of a C Program starts with the?

A user define function
B main function
C void function
D All of these