Top 50+ Solved .NET Programming MCQ Questions Answer
Q. A variable which is declared inside a method is called a________variable
a. Serial
b. Local
c. Private
d. Static
Q. Which is the String method used to compare two strings with each other ?
a. Compare To()
b. Compare()
c. Copy()
d. ConCat()
Q. Minimum and Maximum range of values supported by ‘float’ data type are ?
a. 1.5 * 10 ^-40 to 3.4 * 10 ^38
b. 1.5 * 10 ^-45 to 3.4 * 10 ^30
c. 1.5 * 10 ^-45 to 3.4 * 10 ^38
d. 1.5 * 10 ^-45 to 3.4 * 10 ^37
Q. Which datatype should be more preferred for storing a simple number like 35 to improve execution speed of a program?
a. sbyte
b. short
c. int
d. long
Q. Type of Conversion in which compiler is unable to convert the datatype implicitly is ?
a. ushort to long
b. int to uint
c. ushort to long
d. byte to decimal
Q. Select output of the given set of Code :static void Main(string[] args){String name = "Dr.Gupta";Console.WriteLine("Good Morning" + name);}
a. Dr.Gupta
b. Good Morning
c. Good Morning Dr.Gupta
d. Good Morning name
Q. Which of the following are value types?1.Integer2.Array3.Single4.String5.Long
a. 1, 2, 5
b. 1, 3, 5
c. 2, 4
d. 3, 5
Q. Which of the following is the correct size of a Decimal datatype?
a. 8 Bytes
b. 4 Bytes
c. 10 Bytes
d. 16 Bytes
Q. Which of the following can implement an interface?1.Data2.Class3.Enum4.Structure5.Namespace
a. 1, 3
b. 2, 4
c. 3, 5
d. 4 only