Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which of the following is the correct difference between cin and scanf()?

a) both are the same
b) cin is a stream object whereas scanf() is a function
c) scanf() is a stream object whereas cin is a function
d) cin is used for printing whereas scanf() is used for reading input

Answer: b
Explanation: cin is a stream object available in C++ whereas scanf() is a function available in both C and C++. both are used for reading input from users.

Join The Discussion