Back to Code Walkthrough
Simple Function Return
C++ code walkthrough · Question 15Code
Read carefully. What does this print?1#include <iostream>2using namespace std;34int doubleIt(int n) {5 return n * 2;6}78int main() {9 int a = 3;10 int b = doubleIt(a);11 int c = doubleIt(b) + 1;12 cout << a << " " << b << " " << c << endl;13 return 0;14}