.NET Programming Solved (MCQs)


Section 1

Each Section contains maximum 50 questions. To get more questions visit other sections.

Q11. Which of the following are value types?
1.Integer
2.Array
3.Single
4.String
5.Long

  • A. 1, 2, 5
  • B. 1, 3, 5
  • C. 2, 4
  • D. 3, 5

Q12. Which of the following does not store a sign?

  • A. Short
  • B. Integer
  • C. Long
  • D. Byte

Q13. What is the size of a Decimal?

  • A. 4 byte
  • B. 8 byte
  • C. 16 byte
  • D. 32 byte

Q14. Which of the following is the correct size of a Decimal datatype?

  • A. 8 Bytes
  • B. 4 Bytes
  • C. 10 Bytes
  • D. 16 Bytes

Q15. Which of the following statements is correct?

  • A. When a class inherits an interface it inherits member definitions as well as its implementations.
  • B. An interface cannot contain the signature of an indexer.
  • C. Interfaces members are automatically public.
  • D. To implement an interface member, the corresponding member in the class must be public as well as static.

Q16. Which of the following can implement an interface?
1.Data
2.Class
3.Enum
4.Structure
5.Namespace

  • A. 1, 3
  • B. 2, 4
  • C. 3, 5
  • D. 4 only

Q17. Which of the following will be the correct output for the C#.NET code snippet given below?
String s1 = “ALL MEN ARE CREATED EQUAL”;
String s2;
s2 = s1.Substring(12, 3);
Console.WriteLine(s2);

  • A. ARE
  • B. CRE
  • C. CR
  • D. REA

Q18. If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references?

  • A. s1 is s2
  • B. s1 = s2
  • C. s1.Equals(s2)
  • D. strcmp(s1, s2)

Q19. Which of the following is the correct output of the C#.NET code snippet given below?
int[ , , ] a = new int[ 3, 2, 3 ];
Console.WriteLine(a.Length);

  • A. 20
  • B. 4
  • C. 18
  • D. 10

Q20. Which of the following are NOT Relational operators in C#.NET?
1.>=
2.!=
3.Not
4.<=
5.<>=

  • A. 1, 3
  • B. 2, 4
  • C. 3, 5
  • D. 4, 5


1
2
3
4
5
Back to top button
error: Alert: Content is protected !!