Alien head

C Sharp .Net Quiz

Description: C Sharp .Net Quiz
Number of Questions: 15
Created by:
Tags: .net c-sharp
Attempted 0/15 Correct 0 Score 0

A local variable

  1. Can be used anywhere in the program

  2. Is declared within a method

  3. Must accept a class

  4. Represent a class object


Correct Option: B

An instance variable

  1. is an object of a class

  2. represents an attribute of an object

  3. is a method of a class

  4. a and c


Correct Option: B

Private Button print = new button();

  1. creates a button control

  2. initializes a button control

  3. instantiates button control

  4. a and b

  5. a and c


Correct Option: E

An instance method

  1. Represents the behavior of an object

  2. Represents the attribute of an object

  3. Represents another class

  4. a and b


Correct Option: A

A Constructor

  1. is used to create objects

  2. must have the same name as the class it is declared within

  3. maybe overloaded

  4. b and c

  5. all of the above


Correct Option: E

class Test: Form { }

  1. Creates the class Test : Form

  2. Creates the class Test that inherits the class Form

  3. Creates the class form that inherits the class Test

  4. a and b


Correct Option: B

A variable declared inside a method is called a________variable

  1. Static

  2. Private

  3. Local

  4. Serial

  5. b and d


Correct Option: C

Defining two methods with the same name but with different parameters is called.

  1. Loading

  2. Overloading

  3. Multiplexing

  4. Duplexing


Correct Option: B

Find any errors in the following BankAccount constructor: public int BankAccount() { balance = 0; }

  1. Name

  2. Formal parameters

  3. Return type

  4. No errors


Correct Option: C

In the body of a method, C# uses the variable named_____to refer to the current object whose method is being invoked.

  1. call

  2. this

  3. do

  4. that


Correct Option: B

Classes declared with the sealed keyword cannot be base class.

  1. True

  2. False


Correct Option: A

A method_____an exception when that method detects that a problem has occured.

  1. Trys

  2. Catches

  3. Throws

  4. a and b


Correct Option: C

Exception objects are derived from the class.

  1. Try

  2. Catch

  3. Exception

  4. Event

  5. System


Correct Option: C

An abstract class

  1. may contain instance variables

  2. may contain constructors

  3. may extend another class

  4. a and b

  5. all of the above


Correct Option: E

A____block enclose the code that could throw an exception.

  1. Try

  2. Catch

  3. Exception

  4. Error

  5. a and b


Correct Option: A
+ View questions