Menu

(Solved) : 3 Suppose X Y Int Variables Symbol Char Variable Assume Following Input Data 38 26 67 33 2 Q44028879 . . .

3. Suppose x and y are int variables and symbol is a char variable. Assume the following input data: 38 26 * 67 33 24 $ 55 #

3. Suppose x and y are int variables and symbol is a char variable. Assume the following input data: 38 26 * 67 33 24 $ 55 # 34 # & 63 85 What value (if any) is assigned to x, y, and symbol after each of the following statements executes? (Use the same input for each statement.) a. cin >> x >> y; cin.ignore (100, ‘n’); cin >> symbol; b. cin >> x; cin.ignore (100, ‘*’); cin >> y; cin.get (symbol); c. cin >> y; cin.ignore (100, ‘n’); cin >> x >> symbol; d. cin.get (symbol); cin.ignore (100, ‘*’); cin >> x; cin.ignore (100, ‘n’); cin >> y; e. cin.ignore (100, ‘n’); cin >> x >> symbol; cin.ignore (100, ‘n’); cin.ignore (100, ‘&’); cin >> y; Show transcribed image text 3. Suppose x and y are int variables and symbol is a char variable. Assume the following input data: 38 26 * 67 33 24 $ 55 # 34 # & 63 85 What value (if any) is assigned to x, y, and symbol after each of the following statements executes? (Use the same input for each statement.) a. cin >> x >> y; cin.ignore (100, ‘n’); cin >> symbol; b. cin >> x; cin.ignore (100, ‘*’); cin >> y; cin.get (symbol); c. cin >> y; cin.ignore (100, ‘n’); cin >> x >> symbol; d. cin.get (symbol); cin.ignore (100, ‘*’); cin >> x; cin.ignore (100, ‘n’); cin >> y; e. cin.ignore (100, ‘n’); cin >> x >> symbol; cin.ignore (100, ‘n’); cin.ignore (100, ‘&’); cin >> y;

Expert Answer


Answer to 3. Suppose x and y are int variables and symbol is a char variable. Assume the following input data: 38 26 * 67 33 24 $ …

OR