Chapter 6: Problem 7
Consider the following statements: int num1, num2, num3; double length, width, height; double volume; num1 = 6; num2 = 7; num3 = 4; length = 6.2; width = 2.3; height = 3.4 and the function prototype: double box(double, double, double); Which of the following statements are valid? If they are invalid, explain why. a. volume = box(length, width, height); b. volume = box(length, 3.8, height); c. cout << box(num1, num3, num2) << endl; d. cout << box(length, width, 7.0) << endl; e. volume = box(length, num1, height); f. cout << box(6.2, , height) << endl; g. volume = box(length + width, height); h. volume = box(num1, num2 + num3);
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.