0% found this document useful (0 votes)
39 views3 pages

C++ Programming Questions and Answers

The document is a structured assessment consisting of multiple parts, including very short answer questions, short answer questions, short essay questions, and essay questions related to C++ programming. It covers topics such as basic syntax, control statements, data types, and object-oriented programming features. Students are required to answer a specified number of questions from each part to demonstrate their understanding of C++ concepts.

Uploaded by

reshmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views3 pages

C++ Programming Questions and Answers

The document is a structured assessment consisting of multiple parts, including very short answer questions, short answer questions, short essay questions, and essay questions related to C++ programming. It covers topics such as basic syntax, control statements, data types, and object-oriented programming features. Students are required to answer a specified number of questions from each part to demonstrate their understanding of C++ concepts.

Uploaded by

reshmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Part A – Very Short Answer Questions (1 mark each)

(Answer any 5 questions)

1. What is the use of #include<iostream> in a C++ program?

2. Which header file is required for cout and cin?

3. What is the use of using namespace std;?

4. Write the syntax of an if statement in C++.

5. What will be the output of the following code?

cout << (5 > 3);

6. Define a variable in C++.

7. Name two conditional control statements in C++.

---
Part B – Short Answer Questions (2 marks each)

(Answer any 5 questions)

8. Write a C++ program to check whether a number is even or odd.

9. Differentiate between = and == operators with examples.

10. Explain the structure of a simple C++ program.

11. What are keywords? Give two examples.

12. Write a C++ program to find the largest of two numbers using if-else.

13. Explain cin and cout with syntax and example.

---

Part C – Short Essay Questions (3 marks each)

(Answer any 3 questions)

14. Explain the different types of data types available in C++.


15. Write a C++ program to check whether a number is positive, negative, or zero.

16. What are relational operators? Give examples with output.

17. Explain the working of the nested if statement with an example.

---

Part D – Essay Questions (5 marks each)

(Answer any 2 questions)

18. Explain the features of Object-Oriented Programming.

19. Write a C++ program to find the largest of three numbers using conditional statements.

20. Explain the difference between if, if-else, and if-else-if ladder with suitable examples

You might also like