Online Exam Quiz

questionQuestion  1 to 30

Which of the following is the correct way to define a namespace in C#?

  • namespace myNamespace;
  • Namespace myNamespace
  • namespace myNamespace {}
  • Namespace myNamespace {}
Mark for review

What is the purpose of the .NET Framework Class Library (FCL)?

  • It provides a library of tested, reusable code
  • It compiles C# code
  • It manages memory
  • It handles exceptions
Mark for review

Which of the following is NOT a benefit of using .NET?

  • Language interoperability
  • Code reusability
  • Platform independence
  • No garbage collection
Mark for review

Which of the following is used to convert a type in C#?

  • Convert
  • parse
  • casting
  • all of the above
Mark for review

Which of the following is used to create a read-only property in C#?

  • readonly
  • const
  • get
  • set
Mark for review

What does JIT stand for in the context of .NET?

  • Just-In-Time
  • Java Integrated Technology
  • Just-In-Thread
  • Just-In-Task
Mark for review

Which of the following statements about the 'using' directive is true?

  • It includes namespaces
  • It is used to declare a class
  • It is used to define a method
  • It is used to manage resources
Mark for review

Which of the following is a correct way to define a delegate in C#?

  • delegate void MyDelegate();
  • delegate MyDelegate();
  • void delegate MyDelegate();
  • void MyDelegate delegate();
Mark for review

Which of the following is NOT a .NET data type?

  • int
  • string
  • float
  • char[]
Mark for review

Which of the following is a built-in attribute in .NET?

  • Serializable
  • SerializableObject
  • Serialize
  • Serialized
Mark for review

What is the purpose of the 'finally' block in exception handling?

  • To execute code regardless of an exception
  • To catch exceptions
  • To define exceptions
  • To throw exceptions
Mark for review

Which of the following statements about garbage collection in .NET is true?

  • It collects unused objects automatically
  • It requires manual intervention
  • It does not work for managed code
  • It does not release memory
Mark for review

What is the extension for a web form in ASP.NET?

  • .aspx
  • .asp
  • .html
  • .php
Mark for review

What does CLR stand for?

  • Common Language Runtime
  • Common Language Reference
  • Common Language Repository
  • Common Language Resource
Mark for review

Which of the following is used to define a method in C#?

  • function
  • Method
  • def
  • void
Mark for review

What is the purpose of the 'params' keyword in C#?

  • To pass a variable number of arguments
  • To pass a single argument
  • To pass by reference
  • To pass by value
Mark for review

Which of the following is the correct way to define an array in C#?

  • int[] myArray = new int[5];
  • int myArray[5];
  • int[] myArray = [5];
  • int myArray = new int[5];
Mark for review

Which of the following is NOT a valid operator in C#?

  • +
  • -
  • *
  • &&
Mark for review

Which of the following keywords is used to inherit a class in C#?

  • implements
  • extends
  • inherits
  • None of the above
Mark for review

Which method is used to read a line of text from a file in C#?

  • ReadLine
  • Read
  • ReadToEnd
  • ReadBlock
Mark for review

Which of the following is true about managed code?

  • Managed code runs on CLR
  • Managed code is platform-dependent
  • Managed code is written in assembly language
  • Managed code cannot be debugged
Mark for review

Which of the following is the base class for all .NET classes?

  • System.Object
  • System.Base
  • System.Parent
  • System.Root
Mark for review

Which of the following statements about interfaces in C# is true?

  • Interfaces can contain fields
  • Interfaces can contain method implementations
  • Interfaces can inherit multiple interfaces
  • Interfaces can be instantiated
Mark for review

Which of the following is a correct way to create an instance of a class in C#?

  • MyClass obj = new MyClass();
  • MyClass obj = create MyClass();
  • MyClass obj = instantiate MyClass();
  • MyClass obj;
Mark for review

Which of the following statements about LINQ is true?

  • LINQ stands for Language-Integrated Query
  • LINQ is a part of FCL
  • LINQ can be used with SQL Server
  • All of the above
Mark for review

Which of the following collections is index-based?

  • Hashtable
  • Stack
  • ArrayList
  • Queue
Mark for review

Which of the following is NOT an ASP.NET server control?

  • Button
  • TextBox
  • Label
  • JOptionPane
Mark for review

Which of the following is NOT a valid access modifier in C#?

  • internal
  • public
  • friendly
  • protected
Mark for review

Which of the following is NOT a member of the System namespace?

  • Console
  • Math
  • Array
  • Object
Mark for review

Which of the following is NOT a valid .NET data provider?

  • SQL Server
  • OLEDB
  • MySQL
  • Oracle
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review