Question: This lab is to give you more experience with C++ and prepare you for the quiz. Value 1. Fill in the table of Expression and

 This lab is to give you more experience with C++ and
prepare you for the quiz. Value 1. Fill in the table of

This lab is to give you more experience with C++ and prepare you for the quiz. Value 1. Fill in the table of Expression and Value Expression a 28/3-2 b 6 + 12 * 2-8 4 + 82 d 6 + 17 % 3-2 2 + 22" (9-7) (8 + 72 g (16 + 7) % 2-1 h 127(10-6) (19-3) (2 + 2)74 e f 2. Write out expressions as proper C++ statements. a. a = 12x b. z = 5x 14y + 6k c. y = x d. g = h + 12 4k e. c = a bk4 3. Casting question. Assume a program has the following variable definitions: int a, b = 2; float c = 4.2; and the following statement: a = b*c; What is the value stored in a? A) 8.4 B) 8 C) 0 D) None of the above 4. Formatting questions. Assume declarations: double divSales = 46.63942456; double totalAge = 432.8; double population = 69765.4567; For each part show what would be displayed. a) Write a cout statement so the variable divSales is displayed in a field of 8 spaces, in fixed point notation, with a precision of 2 decimal places. b) Write a cout statement so the variable totalAge is displayed in a field of 12 spaces, in fixed point notation, with a precision of 4 decimal places. c) Write a cout statement so the variable population is displayed in a field of 12 spaces, left-justified, with a precision of 8 decimal places. The decimal point should always be displayed. 5. Predict the output. What is the output? #include using namespace std; int main() { long x, y, z; x = y = z = 4; X += 2; y = 1; z = 3; cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!