Quiz on Functions

Here is a quiz to test your understanding of the concepts related to functions.

1

Consider the following definition of a function:

auto func(int i) {
    if (i < 0) {
        return i * 2.5;
    }

    return i * 1.5;    
}

The return type of the function is ____.

A)

int

B)

double

C)

float

D)

None of these

Question 1 of 50 attempted

Get hands-on with 1400+ tech skills courses.