Online Exam Quiz

questionQuestion  1 to 30

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

Which of the following collections is index-based?

  • Hashtable
  • Stack
  • ArrayList
  • Queue
Mark for review

Which of the following is NOT a loop structure in C#?

  • for
  • foreach
  • loop
  • while
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

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 statements about threading in .NET is true?

  • Threads cannot be prioritized
  • Threads share the same memory space
  • Threads are platform-dependent
  • Threads cannot be synchronized
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 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 keywords is used to inherit a class in C#?

  • implements
  • extends
  • inherits
  • None of the above
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

What does the 'ref' keyword in C# indicate?

  • It indicates a local variable
  • It indicates a parameter is passed by reference
  • It indicates a return value
  • It indicates a constant
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 .NET data type?

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

Which of the following access specifiers is the most restrictive?

  • public
  • private
  • protected
  • internal
Mark for review

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

  • readonly
  • const
  • get
  • set
Mark for review

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

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

Which of the following languages can be used to write .NET applications?

  • C#
  • VB.NET
  • C++
  • All of the above
Mark for review

Which of the following methods is used to start a thread in C#?

  • StartThread
  • Begin
  • Run
  • Start
Mark for review

Which keyword is used to prevent a class from being inherited?

  • abstract
  • sealed
  • static
  • const
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 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 a built-in attribute in .NET?

  • Serializable
  • SerializableObject
  • Serialize
  • Serialized
Mark for review

What is the default access modifier for a class in C#?

  • public
  • private
  • internal
  • protected
Mark for review

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

  • It refers to the current instance of the class
  • It refers to a static member
  • It refers to a base class
  • It refers to a method
Mark for review

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

Which of the following is the default value of an uninitialized integer variable in C#?

  • 0
  • 1
  • null
  • undefined
Mark for review

Which of the following is NOT a part of the .NET Framework?

  • CLR
  • FCL
  • Java Virtual Machine
  • CTS
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 benefit of using .NET?

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

Which of the following is NOT a .NET compatible language?

  • C#
  • Java
  • VB.NET
  • F#
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