Home

C# Programming MCQ Question with Answer

C# Programming MCQ with detailed explanation for interview, entrance and competitive exams. Explanation are given for understanding.

Download C# Programming MCQ Question Answer PDF

Question No : 8
Which datatype should be more preferred for storing a simple number like 35 to improve execution speed of a program?

sbyte
short
int
long

Question No : 9
Which Conversion function of Convert.TOInt32() and Int32.Parse() is efficient?
1) Int32.Parse() is only used for strings and throws argument exception for null string
2) Convert.Int32() used for datatypes and returns directly 0 for null string

2
Both 1,2
1
None of the mentioned

Question No : 10
Correct way to assign values to variable c when int a=12, float b=3.5,int c;

c = a + b;
c = a + int(float(b));
c = a + convert.ToInt32(b);
c = int(a + b) ;