Number of questions 1,751
Number of tests completed 252,495
Number of questions answered 3,765,643
Number of registered users 19,174
Sign In | Register
Skip Navigation Links
Refreshes every 30 seconds
Questions being answeredLocation of users answering questions
Day/time-Show server time zone Location (*=reg. user) Correct? Question number and Question Correct answer
2/17/2019 10:09:18 PM viet nam, ho chi minh city *
29 - What is output from the following code snippet? try { int a = 10; int? b = null; int c = 20; Console.Write(a + (b ?? c)); } catch(Exception) { Console.Write("Error"); }
30
2/17/2019 10:09:07 PM viet nam, ho chi minh city *
28 - A class inherits from 2 interfaces and both the interfaces have the same method name as shown below. How should the class implement the drive method for both Car and Bus interface? interface Car { void Drive(); } interface Bus { void Drive(); }
class Demo : Car,Bus { void Car.Drive() { Console.WriteLine("Drive Car"); } void Bus.Drive() { Console.WriteLine("Drive Bus"); }
2/17/2019 10:08:48 PM viet nam, ho chi minh city *
27 - Difference between Convert.ToString() and .ToString()?
Convert.ToString() will support 'null' and .ToString() will not support 'null'
2/17/2019 10:08:32 PM viet nam, ho chi minh city *
26 - The statement that is used to replace multiple if statements is called
The switch & case statement
2/17/2019 10:08:12 PM viet nam, ho chi minh city *
25 - What happens to the input variable index in the following call: int i = 20; foo( ref i ); public void foo ( ref int i ) { int j = 3; i = j; i += 10; }
i is 13
2/17/2019 10:07:21 PM viet nam, ho chi minh city *
24 - using System; sealed class MyClass { public int x; public int y; } class MyDerivedC : MyClass { } class MainClass { public static void Main() { MyClass mC = new MyClass(); mC.x = 110; mC.y = 150; Console.WriteLine("x = {0}, y = {1}", mC.x, mC.y); } } whats the obvious problem?
cant inherit from a sealed class
2/17/2019 10:07:04 PM viet nam, ho chi minh city *
23 - interface IAnimal { void Walk(); } interface IHuman { void Walk(); } class Man : IAnimal, IHuman{ //How to inherit the method Walk from IHuman } How do you implement the Walk() method from IHuman Interface explicitly?
void IHuman.Walk(){ ........... }
2/17/2019 10:06:56 PM viet nam, ho chi minh city *
22 - using c# predict the output class Test { public static void Main() { int a=3; DoWork(ref a); Console.WriteLine("the value of a is"+a); } public static void DoWork(ref int i) { i++; } }
4
2/17/2019 10:06:43 PM viet nam, ho chi minh city *
21 - Select correct console output ? class A { public A() { Console.WriteLine("A Class"); } } class B : A { public B() { Console.WriteLine("B Class"); } } class Program { static void Main(string[] args) { B b = new B(); Console.ReadLine(); } }
A Class B Class
2/17/2019 10:06:36 PM viet nam, ho chi minh city *
20 - Reading an integer is done with
int.Parse(Console.ReadLine());
Terms of Use
contact@quiznetonline.com Ver. 2.0.6783.38332