Which concepts does the preincrement uses?
Pick out the correct statement
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. int num1 = 5; 6. int num2 = 3; 7. int num3 = 2; 8. num1 = num2++; 9. num2 = --num3; 10. cout << num1 << num2 << num3; 11. return 0; 12. }
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. int x = 5, y = 5, z; 6. x = ++x; y = --y; 7. z = x + ++x; 8. cout << z; 9. return 0; 10. }
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. int x = 5, y = 5, z; 6. x = ++x; y = --y; 7. z = x++ + y--; 8. cout << z; 9. return 0; 10. }