Time remaining
:
:
Test Status
CSHARPRANDOMTEST
Ques 1 :
Which of the following statements is correct?
(A) A constructor can be used to set default values and limit instantiation.
(B) Destructors are used with classes as well as structures.
(C) A class can have more than one destructor.
(D) C# provides a copy constructor.
Ques 2 :
Is it possible to store multiple data types in System.Array?
(A) Yes
(B) No
Ques 3 :
What property is used on the datatable to indicate conflicts after update method is called?
(A) HasCollision
(B) HasErrorConflict
(C) HasError
(D) HasDataError
Ques 4 :
Which of the following is the root of the .NET type hierarchy?
(A) System.Object
(B) System.Base
(C) System.Root
(D) System.Parent
Ques 5 :
You need to identify a type that meets the following criteria: Is always a number Is not greater than 65,535 Which type should you choose?
(A) System.UInt16
(B) System.IntPtr
(C) Int
(D) System.String
Ques 6 :
Code that targets the Common Language Runtime is known as
(A) Legacy
(B) Managed Code
(C) Unmanaged
(D) Native Code
Ques 7 :
Polymorphism?
(A) Polymorphism means multiple forms and different name
(B) Polymorphism means multiple forms but one name
(C) Polymorphism means single forms and single name
(D) All of the above are true
Ques 8 :
Are private class-level variables can inherited?
(A) Yes, and we can access them
(B) No, and we can not access them
(C) Yes, but we can not access them
(D) All of the above are wrong
Ques 9 :
What is the wild card character in the SQL "like" statement?
(A) * (Asterisk)
(B) # (Pound)
(C) % (Percent)
(D) $ (Dollar)
Ques 10 :
Can an Interface be instantiated directly?
(A) Yes
(B) No
Ques 11 :
Which of the following in not service model (three-tier application) in c sharp?
(A) Presentation (UI)
(B) Business (logic and underlying code)
(C) Database (for storing the data)
(D) Data (from storage or other sources)
Ques 12 :
Which of the following statements is correct about the .NET Framework?
(A) .NET Framework uses COM+ services while creating Distributed Applications.
(B) .NET Framework uses DCOM for creating unmanaged applications.
(C) .NET Framework uses DCOM for making transition between managed and unmanaged code.
(D) .NET Framework uses DCOM for achieving language interoperability
Ques 13 :
Which of the following statements is correct about constructors?
(A) Static constructors can use optional arguments.
(B) Overloaded constructors cannot use optional arguments.
(C) If we provide a one-argument constructor then the compiler still provides a zero-argument constructor.
(D) If we do not provide a constructor, then the compiler provides a zero-argument constructor.
Ques 14 :
What is a delegate?
(A) A reference to an object in a different process.
(B) A strongly typed function pointer.
(C) An inter-process message channel.
(D) A light weight thread or process that can call a single method.
Ques 15 :
Which of the following are valid .NET CLR JIT performance counters?
1. Total memory used for JIT compilation
2.Average memory used for JIT compilation
3.Number of methods that failed to compile with the standard JIT
4.Percentage of processor time spent performing JIT compilation
5.Percentage of memory currently dedicated for JIT compilation
(A) 1, 2
(B) 1, 5
(C) 3, 4
(D) 4, 5
Ques 16 :
Which of the following are not types of access modifiers in C#?
(A) external protect
(B) internal protect
(C) protect
(D) internal
Ques 17 :
Your company uses Visual Studio .NET as its application development platform. You have recently finished development of a class named ShopList using the .NET Framework. The class will include ShopItem objects that have the public properties exhibit below:
1. Name
2. ID
3. DiscountCode
You need to enable users of the class to iterate through the ShopList collection, and to list each product's name and ID using the foreach statement. Which of the following code segments will you use to accomplish this task?
(A) public class ShopList : IEnumerator, IEnumerable { // Class implementation }
(B) public class ShopList : IBindingList { // Class implementation }
(C) public class ShopList : ICollection { // Class implementation }
(D) public class ShopList : IDictionary { // Class implementation }
Ques 18 :
Which of the following statements is correct about Managed Code?
(A) Managed code is the code that runs on top of Windows.
(B) Managed code is the code that is written to target the services of the CLR.
(C) Managed code is the code where resources are Garbage Collected.
(D) Managed code is the code that is compiled by the JIT compilers.
Ques 19 :
Which of the following statements is correct about the C#.NET code snippet given below?
namespace PskillsConsoleApplication
{
class Sample
{
public int func()
{
return 1;
}
public Single func()
{
return 2.4f ;
}
}
class Program
{
static void Main(string[ ] args)
{
Sample s1 = new Sample();
int i;
i = s1.func();
Single j;
j = s1.func();
}
}
}
(A) func() is a valid overloaded function.
(B) func() cannot be considered overloaded because: return value cannot be used to distinguish between two overloaded functions.
(C) Overloading works only in case of subroutines and not in case of functions.
(D) The call j = s1.func() will assign 2.4 to j.
Ques 20 :
Which of the following class cannot be inherited?
(A) Abstract
(B) Sealed
(C) Both
(D) None
Submit Answer
Don't Refresh the Page !! ...