Ask 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 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. 5 August, 17:02
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers