--:--









Quiz for Input/output using cin, cout

Course: C++ Language | Subject: Unit 1 | Topic: Introduction to C++



Logo

Q1: Which header file is required to use cin and cout?

Logo

Q2: What operator is used with cout to display output?

Logo

Q3: What operator is used with cin to take input?

Logo

Q4: How do you print a new line using cout?

Logo

Q5: What is the purpose of using "using namespace std;"?

Logo

Q6: Which of the following statements correctly takes an integer input?

Logo

Q7: What will be the output of: cout << 5 + 7 << endl;

Logo

Q8: How can you prompt the user before taking input?

Logo

Q9: Which of the following is NOT a valid output statement?

Logo

Q10: How to read multiple inputs in a single statement?

Logo

Q11: What does endl do in cout << endl;

Logo

Q12: How to output text and variables together?

Logo

Q13: Which of these is the correct way to output a float variable?

Logo

Q14: What happens if you forget to include <iostream> but use cout?

Logo

Q15: What is the correct way to output a double value?

Logo

Q16: How do you output a literal string?

Logo

Q17: Which object is used to read a single character?

Logo

Q18: What does the following code do: cin.ignore();?

Logo

Q19: How to flush the output buffer without adding newline?

Logo

Q20: Which statement correctly outputs the value of variable x and a newline?

Are you ready to start test? Set your time limit