this fragment was on a past exam;
Consider the following code fragment:
int x=2, y=4; char ch;
cin >> x; cin.get(ch); cin >> y;
cout << x * y;
7)
If the user types the following at standard input, what does the above code fragment print? Note: <Enter> means they pressed the Enter key
2 * 2 <Enter>
A)4
B)5 C)6 D)8 E)10
The answer is 10 but i don't understand how
Consider the following code fragment:
int x=2, y=4; char ch;
cin >> x; cin.get(ch); cin >> y;
cout << x * y;
7)
If the user types the following at standard input, what does the above code fragment print? Note: <Enter> means they pressed the Enter key
2 * 2 <Enter>
A)4
B)5 C)6 D)8 E)10
The answer is 10 but i don't understand how