undefined

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Return Value

# include <iostream>
using namespace std;
// function return_two returns an int variable that equals 2
int return_two() {
return 2;
}
int main() {
cout << 1 << endl;
cout << return_two() << endl; // print returned value
cout << 3 << endl;
return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content