.NET Practice Test – 6 Posted by Editor Date 2022-10-12 Comments 0 comment Welcome to your .NET Practice Test - 6 Which of the following statements is incorrect about delegate? A. Delegates are reference types. B. Delegates are object-oriented. C. Delegates are type-safe. D. Only one method can be called using a delegate. The default scope a type is? A. Private B. Public C. Protected D. Internal What will be the output of this code snippet? class sample { int i; double k; public sample (int ii, double kk) { i = ii; k = kk; double j = (i) + (k); Console.WriteLine(j); } ~sample() { double j = i - k; Console.WriteLine(j); } } class Program { static void Main(string[] args) { sample s = new sample(9, 2.5); } } A. 0 0 B. 11.5 0 C. Compile-time error D. 11.5 6.5 The space required for structure variables is allocated on the stack A. True B. False C. May be D. Can’t Say Abstract class contains what? A. Abstract methods. B. Non Abstract methods. C. Both D. None Reference is a _? A. Copy of class which leads to memory allocation. B. Copy of class that is not initialized. C. Pre-defined data type. D. Copy of class created by an existing instance. Which of the following is incorrect about constructors? A. Defining of constructors can be implicit or explicit. B. The calling of constructors is explicit. C. Implicit constructors can be parameterized or parameter less. D. Explicit constructors can be parameterized or parameter less. If a class “math” had an “add” property with get and set accessors, then which of the following statements will work correctly? A. math.add = 20; B. math m = new math(); m.add = 10; C. Console.WriteLine(math.add); D. None of the above. Choose the wrong statement about properties used in C#.Net? A. Each property should consist of accessors both get and set. B. A property cannot be either read or write-only. C. Properties can be used to store and retrieve values to and from the data members of a class. D. Properties are like actual methods that work like data members. The data members of a class by default are? A. protected, public B. private, public C. private D. public Time is Up! Time's up Share: Editor Previous post .NET Practice Test - 5 2022-10-12 Next post .NET Practice Test - 7 2022-10-12 You may also like Oracle Tutorial Videos 8 April, 2023 Spring Tutorial Videos 8 April, 2023 Ui Technologies Tutorial Videos 1 April, 2023