0

programming languages Online Quiz - 167

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

All the members of the class which are to be serialized using xml serialization should be declared public.

  1. True.

  2. False

  3. True , if the Serializable attribute is not used.

  4. The members have to be protected.


Correct Option: A

Consider a class inheriting another class and 2 interfaces. Which of the following statements is true?

  1. .Net doesnot support multiple inheritance. Hence cannot inherit all the 3, results in error.

  2. .Net allows to inherit only 1 class and 1 interface, hence error.

  3. The class has to be inherited first and then the interfaces.

  4. The interface has to be inherited first then class.


Correct Option: C

You create an application with built-in exception handling. For some types of exceptions, you want to add an event to the Event Log that specifies the line of code that initiated the exception. Which Exception property should you use?

  1. Message

  2. StackTrace

  3. Source

  4. Data


Correct Option: B

How many general purpose registers are there ?

  1. 1

  2. 2

  3. 4

  4. 16

  5. 32


Correct Option: D

Which is used to reflect the current status of System ?

  1. CPU

  2. Task manager

  3. PSW

  4. Control byte


Correct Option: C

What is the size of PSW ?

  1. 32

  2. 24

  3. 64

  4. 16


Correct Option: C

What is the size of General purpose registers ?

  1. 32

  2. 16

  3. 8

  4. 24


Correct Option: A

Which bytes are used to hold Address in 24-bit addressing ?

  1. Low order 2 bytes

  2. Low order 3 bytes

  3. All 4 bytes

  4. Fourth byte


Correct Option: B

Assembler belongs to which level language ?

  1. Low level

  2. High level

  3. Both 1 and 2

  4. None


Correct Option: A

General purpose registers are used to hold

  1. Data

  2. Address

  3. Both 1 and 2

  4. Can't say


Correct Option: C

What is the range of Offset(Displacement) ?

  1. 0 through 2K

  2. 0 through 4K

  3. 1 through 4K

  4. 0 Through 12K


Correct Option: B

How many types of registers are there generally ?

  1. 1

  2. 2

  3. 4

  4. 3


Correct Option: C

Which registers are not used for application purpose

  1. General,Control registers

  2. Control,Floating registers

  3. Control,Access registers

  4. None of these


Correct Option: C

What is the output of following code?

  1. yes

  2. No output

  3. Compilation error

  4. Runtime exception


Correct Option: A

An inner class must be defined within the opening and closing braces of a class, but outside any method - just like data members

  1. True

  2. False


Correct Option: B

Can an abstract class have constructor(s)?

  1. Yes

  2. No

  3. In specific conditions

  4. Not sure


Correct Option: A

An Interface must have a constructor

  1. True

  2. False


Correct Option: B

An inner class can extend or implement any class or interface

  1. True

  2. False


Correct Option: A

Anonymous classes do not allow the use of extends and implements clauses

  1. True

  2. False


Correct Option: A

Is it allowed to define a constructor for anonymous class?

  1. Yes

  2. No

  3. In specific conditions

  4. Not sure


Correct Option: B
- Hide questions