If you want to examine an input value without actually removing it from the input stream, you can apply a member function of cin to the variable ch, which you are to assume is a char type variable. Which of these does this task?

a. cin.get(ch);
b. cin.put(ch);
c. cin.peek(ch);
d. cin.putback(ch);


c)
Explanation: cin.peek(ch) returns the next character from the input stream without removing it from the input stream.

Computer Science & Information Technology

You might also like to view...

Method getSelectedIndex of class JComboBox returns:

a. the index of the selected item in the JComboBox. b. the selected item in the JComboBox, as a String. c. the index of the previously selected item. d. None of the above.

Computer Science & Information Technology

Define the following security terms.

a) digital signature b) hash function c) symmetric key encryption d) digital certificate e) Denial of Service attack f) worm g) message digest h) collision i) triple DES j) session keys

Computer Science & Information Technology

Which type of cryptography creates a value that is primarily used for comparison purposes?

A. asymmetric cryptography B. hashing C. symmetric cryptography D. public key encryption

Computer Science & Information Technology

The name of the control below is ____.Text Color: