Tag: programming languages

Questions Related to programming languages

  1. testObj = CTest

  2. testObj = CTest()

  3. CTest testObj = CTest()

  4. testObj = new CTest()


Correct Option: B
  1. testObj = CTest

  2. testObj = CTest()

  3. CTest testObj = CTest()

  4. testObj = new CTest()


Correct Option: B

The constructor in python is _____

  1. def_init()

  2. name of class itself.

  3. python_init_

  4. init


Correct Option: D

How to initialize the variable with private scope ?

  1. Prefix the string 'private' to the variable name.

  2. initialize it with '_init_private'

  3. initialize it with double underscore '__'

  4. append the keyword 'pvt' before the variable.


Correct Option: C
  1. an operator

  2. a method

  3. nothing

  4. a keyword in Java


Correct Option: A