LogoLearning For Everyone
Take Quiz
Contact Us
Related Topics
Related Topics
Selected Topic: All
1. Which of the following is the correct syntax of including a user defined header files in C++?
Choose the correct option:
  • a) #include <userdefined.h>

  • b) #include <userdefined>

  • c) #include “userdefined”

  • d) #include [userdefined]

C++ uses double quotes to include a user-defined header file. The correct syntax of including user-defined is #include “userdefinedname”.

2. Which of the following is a correct identifier in C++?
Choose the correct option:
  • a) 7var_name

  • b) 7VARNAME

  • c) VAR_1234

  • d) $var_name

The rules for writing an identifier is as follows:

3. Which of the following is called address operator?
Choose the correct option:
  • a) *

  • b) &

  • c) _

  • d) %

&amp; operator is called address operator and is used to access the address of a variable.

4. Which of the following is used for comments in C++?
Choose the correct option:
  • a) // comment

  • b) /* comment */

  • c) both // comment or /* comment */

  • d) // comment */

Both the ways are used for commenting in C++ programming. // is used for single line comments and /* … */ is used for multiple line comments.

5. What are the actual parameters in C++?
Choose the correct option:
  • a) Parameters with which functions are called

  • b) Parameters which are used in the definition of a function

  • c) Variables other than passed parameters in a function

  • d) Variables that are never used in the function

Actual parameters are those using which a function call is made i.e. which are actually passed in a function when that function is called.

Items per page: