Programming Languages: Java, C++, and C# Basics

Test your knowledge of fundamental concepts across multiple programming languages including Java history, C++ functions and data types, and C# properties and indexers.

20 Questions Published

Questions

Question 1 True/False

Read-only Properties will be having only a set accessor in the property implementation?

  1. True
  2. False
Question 2 True/False

We can only assign values for read only properties from the constructor?

  1. True
  2. False
Question 3 True/False

We can declare a field and a property with the same name as they both get stored in differnt places memory?

  1. True
  2. False
Question 4 True/False

Static properties can access any members of the class?

  1. True
  2. False
Question 5 True/False

A base calss property can be polymarphically overriden in derived class, but modifiers like virtual, override are used at property level not accessor level.

  1. True
  2. False
Question 6 True/False

An abstract property in a class carries no code. The derived class will implement it?

  1. True
  2. False
Question 7 True/False

In c-sharp we create indexers in place of parameterized property?

  1. True
  2. False
Question 8 True/False

Property works on compile and runtime?

  1. True
  2. False
Question 9 True/False

If no accessibility level is specified for property, a default level Public is used?

  1. True
  2. False
Question 10 True/False

Property return type can not be void?

  1. True
  2. False
Question 11 True/False

You can give a property an accessibility higher than the declaring class?

  1. True
  2. False
Question 12 True/False

Properties that besides retrieving and writing the value of the field, also it can trigger an event related to the field?

  1. True
  2. False
Question 13 Multiple Choice (Single Answer)

What is the return type of main() ?

  1. void
  2. int
  3. char
  4. long
Question 14 Multiple Choice (Single Answer)

Which is not a basic data type of C++ ?

  1. int
  2. char
  3. string
  4. float
Question 15 Multiple Choice (Single Answer)

Which is the most widely used and non-used storage class specifier ?

  1. static
  2. auto
  3. mutable
  4. register
Question 16 Multiple Choice (Single Answer)

When a function is declared __________________, the function is expanded at the calling block.

  1. friend
  2. virtual
  3. inline
  4. static
Question 17 Multiple Choice (Single Answer)

which of the following is not true for static member function ?

  1. A static member function can access only static member data, static member functions and data and functions outside the class.
  2. A static member function can be called, even when a class is not instantiated
  3. A static member function cannot be declared virtual
  4. A static member function can have access to the 'this' pointer of the class
Question 18 Multiple Choice (Single Answer)

Java programming language was invented by

  1. Mary Bellis
  2. Willam brothers
  3. James Gosling and others
  4. Patrick Gill and others
Question 19 Multiple Choice (Single Answer)

The icon for java

  1. Oak tree
  2. Duke
  3. Water falls
  4. Teacup
Question 20 Multiple Choice (Single Answer)

The small group of Sun engineers called ______ were the originators of Java.

  1. Sun group
  2. Green Team
  3. Oak Team
  4. Green group