In other words, you can do this:
Of course, you don't have to use the same variable name in main().Code:int function() {
int x = 2 * 2;
return x;
}
int main() {
int x = function();
return 0;
}
Printable View
In other words, you can do this:
Of course, you don't have to use the same variable name in main().Code:int function() {
int x = 2 * 2;
return x;
}
int main() {
int x = function();
return 0;
}