C++ Interview Question and Answers
41. |
What are the rules for framing variable name? |
|
- Variable names may contain letters, numbers and underscore character(_).
|
|
|
42. |
Write a short note on enumerated data type? |
|
- Enumerated data type helps users in creating a list of identifiers, also called as symbolic numeric constants of the type int.
-
Syntax : enum data type identifier ( value 1, value 2,….value n).
|
`
|
|
43. |
How can the special character be represented? |
|
- Special characters are represented using escape sequences.
- Escape sequences are represented using characters prefixed with a backslash.
|
|
|
44. |
What are the divisions in integral type? |
|
- The divisions in Integral type are int and char. Integral is the integer data type.
- It cannot hold fractional values. Char is character data type that can hold both the character data and the integer data.
|
|
|
45. |
What effect does the visibility label public, has on the members of a class? |
|
The members that have been declared as public can be accessed from outside the class also.
|
|
|