Online Exam Quiz

questionQuestion  1 to 30

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 a value type?

  • string
  • object
  • int
  • delegate
Mark for review

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

  • internal
  • public
  • friendly
  • protected
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

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 NOT a loop structure in C#?

  • for
  • foreach
  • loop
  • while
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 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 NOT a part of the .NET Framework?

  • CLR
  • FCL
  • Java Virtual Machine
  • CTS
Mark for review

Which of the following are value types in .NET?

  • int, float, bool
  • string, object, array
  • class, interface, delegate
  • None of the above
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 is used to define a method in C#?

  • function
  • Method
  • def
  • void
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 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 used to convert a type in C#?

  • Convert
  • parse
  • casting
  • all of the above
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 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 keyword is used to prevent a class from being inherited?

  • abstract
  • sealed
  • static
  • const
Mark for review

What is the extension of a compiled .NET assembly?

  • .exe
  • .dll
  • .exe or .dll
  • .cs
Mark for review

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

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

Which keyword is used to define an interface in C#?

  • class
  • struct
  • interface
  • type
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 the correct way to define a namespace in C#?

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

What is the role of the Global Assembly Cache (GAC)?

  • It stores .NET assemblies
  • It manages application configuration
  • It handles network communication
  • It manages memory allocation
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 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 is the base class for all .NET classes?

  • System.Object
  • System.Base
  • System.Parent
  • System.Root
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 type of constructor in C#?

  • Static constructor
  • Private constructor
  • Virtual constructor
  • Default constructor
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

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