Ask Question
8 December, 23:19

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.)

+5
Answers (1)
  1. 9 December, 01: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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers