SOLVED QUESTIONS-GS

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’?