63 132
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #24108 in C++ for Nourah

Question #24108
What is wrong with the following code?
for (int i = 0; i < 10; i++) {
int x = 4;
cout << i << endl;
}
cout << x << endl;
Expert's answer
IntegerX is used and defined in cycle i (0<i<10), in this way U cannot
"cout" X in any area except cycle (0<i<10).

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions