programming languages Online Quiz - 31

Description: programming languages Online Quiz - 31
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Is sizeof a keyword?

  1. True

  2. False

Correct Option: B

For concatenation of strings, which method is good, StringBuffer or String

  1. String

  2. StringBuffer

  3. Both

  4. None

Correct Option: B

The following are used for Thread communication

  1. wait,notify,notifyall

  2. wait,notify,notifyall,sleep

  3. Yield,sleep

  4. yield, sleep, wait

Correct Option: A

Java provide ______ construct to find out the size of an object

  1. sizeOf ()

  2. size()

  3. getSize()

  4. No such method in java to find size of an object directly.

Correct Option: D
  1. public, abstract

  2. abstract, final

  3. final

  4. public

Correct Option: A
  1. a Keyword

  2. a method

  3. a special identifier

  4. none

Correct Option: D
  1. Value type variables are stored on stack. Reference type variables are stored on heap.

  2. Value type holds the data directly, Reference type points to the location that holds the data.

  3. Value type cannot contain null value. Reference type can contain null value.

  4. A new type cannot be derived from value type. A new type can be derived from reference type.

  5. All of the above

Correct Option: E
  1. string

  2. class

  3. delegate

  4. struct

  5. interface

Correct Option: D
  1. An indexer is always an instance member, but a property can be static also.

  2. A property is always an instance member, but An indexer can be static also.

  3. Indexers can not be participate in inheritance, properties can also participate in inheritance

  4. No difference

Correct Option: A

Abstract methods should override in non abstract child class. If the child class is also abstract class then abstract methods overriding is not mandatory.

  1. True

  2. False

Correct Option: A
  1. Structures can be used as a base for other structures.

  2. A structure can implement one or more interfaces.

  3. Structure members can be methods, fields, indexers, properties, operator methods, and events.

  4. Structures can also define constructors, but not destructors. And you cannot define a default (parameterless) constructor for a structure.

Correct Option: B,C,D
  1. Can not use in structs

  2. A derivation constraint

  3. A default constructor constraint

  4. A reference/value type constraint

Correct Option: B,C,D
- Hide questions