Chapter 4: Problem 22
Suppose that score is an int variable. Consider the following if statements: i. if (score = \(=70\) ) cout \(<<\) "Grade is \(\mathrm{C}\). " \(<<\) endl ii. if (score \(=70\) ) cout \(<<\) "Grade is \(\mathrm{C}\). \(^{\prime \prime}<<\) endl Answer the following questions: a. What is the output in (i) and (ii) if the value of score is \(70 ?\) What is the value of score after the if statement executes? b. What is the output in (i) and (ii) if the value of score is \(80 ?\) What is the value of score after the if statement executes?
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.