Basic C++ Interview Question and Answers
6. |
What are the different statements in C++ |
|
- Input/output
- Declaration
- Assignment
- Control structures
- Function call
- Object message
- Return
|
|
|
7. |
What is a file scope? |
|
A variable declared all blocks and functions (precisely main()) has the scope of a file. The scope of a file scope variable is the entire program. The life time of a file scope variable is the life time of a program. |
|
|
8. |
What is the default access specifier? |
|
Private is the default access specifier. |
|
|
9. |
What is array of strings? |
|
An array of strings is a two dimensional character array. The size of first index (rows) determines the number of strings and the size of second index () determines maximum length of each string. |
|
|
10. |
What is type cast? |
|
Type cast refers to the process of changing the data type of the value stored in a variable. |
|
|