Question: 4. Using cin, Allocating Memory, and Writing Assignment Statements cin, Memory Allocation, and Assignment Statements Show the variable name and value of each statement 1.double
|
4.Using cin, Allocating Memory, and Writing Assignment Statements
1.double x; cin >> x; //Assume the user enters 3.24. | ||
| 2.double a, b, c = 0.0; | ||
| 3.int d = 2, x = 3, y = 4; 4 = d x + y; | ||
| 4.double def = 123.5; int y; y = def; | ||
| 5.int b = 9.0; | ||
| 6.int num1= 8, num2 = 3, temp = 0; temp = num1; num1 = num2; num2 = temp; | ||
| 7.int num; cin >> num; //Assume the user enters 8. num++; | ||
| 8.int c = 8; ++c; c--; | ||
| 9.double x = 5.0; int y = 4; x = x + y / 4; | ||
| 10.double x = 5.0; int y = 4; y = x + y/4; | ||
| 11. int count = 0; cout << ++count << endl; cout << count++ << endl; cout << count << endl; |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
