C++ Interview Question and Answers

36. What is calling a function?
 
  • A function can be called or invoked from another function by using its name.
  • The function name may include a set of actual parameters, enclosed in parenthesis separated by comma.
 
Your Name Your Email-ID
Your Answer
`
37. What are the advantageous of functions?
  Functions are advantageous as they
  • Reduce the size of the program.
  • Induce reusability of code.
  • Reusability of code (function fact is executed more than once).
  • A function can be shared by other programs by compiling it separately and loading them together.
 
Your Name Your Email-ID
Your Answer
38. What are functions?
 
  • Functions are the building blocks of C++ programs.
  • Functions are also the executable segments in a program.
  • The starting point for the execution of a program is main ().
 
Your Name Your Email-ID
Your Answer
39. When are the variables to be declared?
 
  • Declaration statement variables need to be declared and defined before they are used in a program.
  • Declaration of a variable introduces a variable's name and its associated data type.
 
Your Name Your Email-ID
Your Answer
40. What is the use of declaration statements?
  Declaration statements are used to declare
  • user defined data type identifiers,
  • function headers,
  • pointer variables and the like.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 8 of 10