IT course and jobs updates
192 subscribers
22 photos
11 links
Download Telegram
17. Which keyword is used to define an extension method?
Anonymous Quiz
0%
A. this
50%
B. extends
50%
C. static
0%
D. partial
18. What is the output of this code? object o = null;Console.WriteLine(o ?? "Default");
Anonymous Quiz
40%
A. null
20%
B. Default
40%
C. Runtime error
0%
D. Compilation error
19. Which operator cannot be overloaded in C#?
Anonymous Quiz
0%
A. +
50%
B. ==
50%
C. ?:
0%
D. -
20. Which collection in C# works on FIFO (First In First Out) principle?
Anonymous Quiz
0%
A. Stack<T>
40%
B. Queue<T>
40%
C. List<T>
20%
D. HashSet<T>
21. Which method is always called before an object is destroyed by GC (if implemented)?
Anonymous Quiz
25%
A. Dispose()
25%
B. Close()
50%
C. Finalize()
0%
D. Release()
22. Which C# keyword prevents further overriding of a method?
Anonymous Quiz
20%
A. abstract
40%
B. sealed
40%
C. override
0%
D. readonly
23. What will be the output?int[] arr = new int[5];Console.WriteLine(arr[0]);
Anonymous Quiz
20%
A. 0
20%
B. null
60%
C. Garbage value
0%
D. Compilation error
25. Which keyword is used to safely handle exceptions?
Anonymous Quiz
40%
A. finalize
0%
B. throw
60%
C. try-catch
0%
D. dispose
26. Which of the following types supports nullable values in C#?
Anonymous Quiz
0%
A. int?
17%
B. string?
50%
C. Nullable<int>
33%
D. Both A and C
27. What will be the output?

string s = "abc"; s.ToUpper(); Console.WriteLine(s);
Anonymous Quiz
86%
A. ABC
0%
B. abc
14%
C. Compilation error
0%
D. NullReferenceException
28. Which of these LINQ methods returns the first element of a sequence?
Anonymous Quiz
0%
A. Take()
100%
B. First()
0%
C. Select()
0%
D. Where()
Forwarded from Rohit Chopade
Q1. Which keyword is used to create an object in C#?
Anonymous Quiz
67%
New
33%
Class
0%
Object
0%
This
Forwarded from Rohit Chopade
Forwarded from Rohit Chopade
In C#, objects are created from a:
Anonymous Quiz
60%
Class
20%
Method properties
20%
Merhod
0%
Variables
Forwarded from Rohit Chopade
Consider the code:

class Car { } Car myCar = new Car(); Here what is my car?
Anonymous Quiz
18%
Class
27%
Method
45%
Variable
9%
Data type