MCQ2

MCQ2

Professional Development

10 Qs

quiz-placeholder

Similar activities

CEFR - test your knowledge

CEFR - test your knowledge

Professional Development

11 Qs

ALC Book 10 - Lesson 1

ALC Book 10 - Lesson 1

Professional Development

10 Qs

Defi Quizz

Defi Quizz

Professional Development

13 Qs

Testing and Lab Procedures

Testing and Lab Procedures

University - Professional Development

15 Qs

Cuestionario TEST VAK

Cuestionario TEST VAK

Professional Development

10 Qs

Chi bộ 3 - Chuyên đề: Kỷ niệm 75 năm chiến thắng Điện Biên Phủ

Chi bộ 3 - Chuyên đề: Kỷ niệm 75 năm chiến thắng Điện Biên Phủ

Professional Development

10 Qs

COMMERCE QUIZ

COMMERCE QUIZ

University - Professional Development

10 Qs

Webinar Kecemerlangan SPM

Webinar Kecemerlangan SPM

Professional Development

10 Qs

MCQ2

MCQ2

Assessment

Quiz

Education

Professional Development

Hard

Created by

Gadala Suhasini

Used 4+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

class Program{

static void Main(string[] args) {

int result; int i;

for(i=-2;i<2;i++) {

result = i!=0?100/i:0;

Console.WriteLine("100/" + i + "is" + result);

Console.Read();

} } }

100/-2is-50

100/-1is-100

100/1is100

100/-2is-50

100/-1is100

100/1is100

It causes an exception

100/-2is-50

100/-1is-100

100/0is0

100/1is100

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The class Test1 inherits from class Test. An instance of Test1 is created and referenced in variable T1 using the following code: Test1 T1= new Test();

A variable called C1 of type Test is declared and T1 is a cast as type Test and assigned to C1 using the following code

Test C1 = (Test) T1

Which is the alternative syntax for the code above?

Test C1 = Test as Test1

Test C1 = T1 as Test1

Test(Test1) C1 = T1

Test C1 = (Test1 as Test) T1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is statement is correct about constructor in C#.Net

A constructor cannot be declared as private

A constructor cannot be overloaded

A constructor can be static constructor

none of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when an exception object is not caught and handled properly?

The control goes to default exception handler

The compiler will not terminate the program

The compiler will terminate the program

None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can an object of child type be assigned to variable of parent?

for example

card crd;

Birthday bd = new Birthday('Luci",42);

crd=bd;

No, there must be always be an exact match between the variable and object type

No, but a object of parent type can be assigned to variable of child

Yes an object can be assigned to a reference variable of parent

Yes, any object can be assigned to any reference variable

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following program

1,5

0,5

1,0

3,0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

what is the output of the program

second method

20

second method

first method

second method

20

first method

second method

first method

20

second method

20

first method

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?