144k views
1 vote
What is the output of the following program? #include using namespace std; void dosomething(int&; int main( { int x = 2; cout << x << endl; dosomething(x; cout << x << endl; return 0; } void dosomething(int& num { num = 0; cout << num << endl; }?

User Carisa
by
7.2k points

1 Answer

2 votes
The code provided has numerous errors and I cannot decipher it. Please clarify, or if this is the actual code, the output would be a bunch of errors.
User Savita
by
7.6k points