128k views
2 votes
Suppose that alpha, beta, and gamma are int variables and the input is: 100 110 120 200 210 220 300 310 320 What is the value of gamma after the following statements execute? cin >> alpha; cin.ignore (100, '\\'); cin >> beta; cin. ignore (100, '\\'); cin >> gamma;

A) 100
B) 200
C) 300
D) 320

1 Answer

3 votes

Answer:

The answer to this question is the option "C".

Explanation:

In the question, it is given that alpha, beta, and gamma are an integer variable that assigns the value. In this code, we use the ignore() function. This function used to ignore or clear one or more characters from the input buffer. So the answer to this question is 300.

User RamiroPastor
by
6.3k points