Quiz
Quiz
Quiz
A. Oracle
B. Microsoft
C. GNU project
D. Google
ANSWER: B
Which is the correct order for implicit type conversion to convert a smaller to a
larger type in C#?
A. har -> int -> long -> float -> double
B. ool -> char -> int -> long -> float -> double
C. har -> int -> float -> long -> double
D. ool -> char -> int -> long -> double -> float
ANSWER: A
What will be the output of the following C# code, if the input is 123:using
System;namespace MyApplication { class Program { static void Main(string[] args) {
Console.WriteLine("Enter a number:"); int num = Console.ReadLine();
Console.WriteLine("Given number is: " + num); } }}?
A. iven number is:123
B. iven number is: 123
C. iven number is: "123"
D. rror
ANSWER: D
Which statement is correct about the following C# statement int[] x= {10, 20, 30};?
A. x' is a reference to the array created on stack
B. x' is a reference to an object created on stack
C. x' is a reference to an object of a 'System.Array' class
D. None of the above
ANSWER: C
Which of the correct syntax to declare an array with 2 rows and 3 columns in C#?
A. int arr[2][3] = new int[2][3];
B. int arr[2,3] = new int[2,3];
C. int[,] arr = new int[2,3];
D. int [,]arr = new [2,3]int;
ANSWER: C
In C#, the objects created using new operator are stored in ___?
A. Cache Memory
B. Stack Memory
C. Heap Memory
D. None of the above
ANSWER: C
Choose the correct option among the following indexers which correctly allows to
index in same way as an array?
A. A class
B. An interface
C. A function
D. A property
ANSWER: A