Ask Question
23 April, 20:11

Which of the following code segments could be used to skip the first two characters of an input line (they may or may not be whitespace characters) and input the integer value that comes next? (Variable dummy is of type char, and inputInt is of type int.)

+4
Answers (1)
  1. 23 April, 21:11
    0
    Following are the code in the C+ + Programming Language.

    cin. get (dummy);

    cin. get (dummy);

    cin >> inputInt;

    Explanation:

    In the above code that is written in the C+ + Programming Language, the first two code is written for the string character input from the user and it input or not input the whitespace characters and the last one is used for the input of the integer character from the user. The character variable they used that is 'dummy' and the integer variable they used is 'inputInt'.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following code segments could be used to skip the first two characters of an input line (they may or may not be whitespace ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers