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
 
Your Name Your Email-ID
Your Answer
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.
 
Your Name Your Email-ID
Your Answer
8. What is the default access specifier?
  Private is the default access specifier.
 
Your Name Your Email-ID
Your Answer
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.
 
Your Name Your Email-ID
Your Answer
10. What is type cast?
  Type cast refers to the process of changing the data type of the value stored in a variable.
 
Your Name Your Email-ID
Your Answer
12345 Page 2 of 5