Question: You have the following code: int op 1 ; int op 2 ; char operator; cin > > op 1 > > operator > >

You have the following code:
int op1;
int op2;
char operator;
cin >> op1>> operator >> op2;
This is your keyboard input to be processed by cin: 17*10
Which statement below is correct?
Group of answer choices
17*10 will cause an error because you can't have multiple >> operations with a single cin
17*10 will cause an error because * is not a character
op1 will hold 17, op2 will hold 10, and operator will hold *
op1 will hold 10, op2 will hold 17, and operator will hold *

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!