1.

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 inputI had been asked this question in class test.Question is taken from C++ Concepts in portion Basics Concepts of C++ of C++

Answer»

Right choice is (b) cin is a stream object whereas scanf() is a FUNCTION

The EXPLANATION is: 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.



Discussion

No Comment Found

Related InterviewSolutions