
MCQ2

Quiz
•
Education
•
Professional Development
•
Hard
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
What is the output of the following program
1,5
0,5
1,0
3,0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Similar Resources on Wayground
6 questions
Refleksi Berbagi Peraktik Baik "Menyusun Kisi-Kisi Soal PTS"

Quiz
•
Professional Development
10 questions
Administering Standardized Tests

Quiz
•
University - Professi...
11 questions
2023-24 Summative ELPAC Training Quiz

Quiz
•
Professional Development
12 questions
Test-Taking Strategies

Quiz
•
KG - Professional Dev...
15 questions
UJIAN OUTCOME-BASED EDUCATION (OBE) DIPLOMA SENIBINA LANDSKAP

Quiz
•
Professional Development
10 questions
Labaree Learning Event

Quiz
•
Professional Development
15 questions
Assessing and Observing Young Children(PDEC 201) Test

Quiz
•
Professional Development
7 questions
Chapter 14

Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade