Multiple return Statements in Functions




This video tutorial explains how to use multiple return statements in functions.
You will learn what is the use of return statement and also how to use return statement in functions.

source code for this tutorial

#include <iostream>

using namespace std;

bool check(int);

int main()
{
    if(check(16))
        cout << "you are adult";
    else
        cout << "you are a kid";

    return 0;
}

bool check(int age){

if(age >= 18)
    return true;
else
    return false;

}

 
Back To Top