Q1. What is the difference between a keyword and identifier?

Q2. What are literals in C++ ? How many types of literals are allowed in C++ ?

Q3. How many ways are there in C++ to represent an integer constant?

Q4. What is the difference between ‘a’ and “a” in C++ ?

Q5. What will be the sizes of following constants: ‘\a’, “\a”, “Reema\’s”, ‘\”’ ?

Q6. What factors guide the choice of identifiers in programs?

Q7. Assume that X has been declared as an integer variable in a C++ program. What will happen if the program encounters non-integer data while reading the value of X? How can the situation be rectified?

Q8. What does the file iostream.h consist of?

Q9. What are the predefined stream objects in I/O library?

Q10. Write the following real constants in exponent form:

            17.251, 151.02, 0.00031, 0.452.

Q11. If a reference to cerr is producing a type error in a program, what could be the possible reason? How can this error be removed?

Q12. In C++, how are devices treated?

Q13. Which one condition, every C++ program must fulfill?

Q14. What types of errors generally occur while programming?

Q15. What do you understand by ‘code generation’?

Q16. Complete the following incomplete sentences:

Q17. Check the following code for possible errors:

int main()


            cout<<””Hello World!!”;

            return 0;


Q18. Point out the errors in the following program:

int main()


            cout<<”Enter variable”;



            cout<<”The square is”<<sqrs;

Q19. Write the corrected version of program mentioned in problem 18.

Q20. Write a C++ program that inputs a student’s marks in three subjects (out of 100) and prints the percentage marks.