Time remaining
:
:
Test Status
CSHARPRANDOMTEST
Ques 1 :
In C#, the statement that is used to replace multiple if statements is called?
(A) The nestedif statement
(B) The #endif statement
(C) The switch case statement
(D) None of these
Ques 2 :
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 3 :
Feature of a local variable
(A) It must be declared within a method
(B) It represent a class object
(C) It can be used anywhere in the program
(D) It must accept a class
Ques 4 :
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 5 :
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 6 :
Which of the following characters ends every C# statement?
(A) Period (.)
(B) Colon (:)
(C) Semicolon (;)
(D) Comma (,)
Ques 7 :
Is it possible to store multiple data types in System.Array?
(A) Yes
(B) No
Ques 8 :
___________________ allow to encapsulate discrete units of functionality and provide a graphical representation of that functionality to the user
(A) object
(B) controls
(C) class
(D) graphics
Ques 9 :
In C#, by default structs are passed how?
(A) By reference.
(B) By value.
(C) By address.
(D) By memory.
Ques 10 :
What is ENUM?
(A) It is used to initialize variables
(B) It is used to define constants
(C) It is used to define variables
(D) None
Ques 11 :
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 12 :
Is it possible to invoke Garbage Collector explicitly?
(A) Yes
(B) No
Ques 13 :
Which property will you use to process different server paths in a page?
(A) Request
(B) Response
(C) Server
(D) Application
Ques 14 :
Which of the following assemblies can be stored in Global Assembly Cache?
(A) Private Assemblies
(B) Shared Assemblies
(C) Protected Assemblies
(D) Friend Assemblies
Ques 15 :
Convert vs. Parse methods
(A) Convert converts the value, Parse is for parsing
(B) Convert allows null values, Parse cannot
(C) Both are same
(D) None of these
Ques 16 :
Two methods with the same name but with different parameters.
(A) Overloading
(B) Multiplexing
(C) Duplexing
(D) Loading
Ques 17 :
Which of these statements correctly declares a two-dimensional array in C#?
(A) int[][] myArray;
(B) int[,] myArray;
(C) System.Array[2] myArray;
(D) int[2] myArray;
Ques 18 :
What does Dispose method do with connection object?
(A) Close the connection
(B) Temporary dispose the connection
(C) Deletes it from the memory
(D) All of the above
Ques 19 :
Which of the following benefits do we get on running managed code under CLR?
1. Type safety of the code running under CLR is assured.
2. It is ensured that an application would not access the memory that it is not
authorized to access.
3. It launches separate process for every application running under it.
4. The resources are Garbage collected.
(A) Only 1, 2 and 4
(B) Only 2, 3 and 4
(C) Only 1 and 2
(D) All of the above
Ques 20 :
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.
Submit Answer
Don't Refresh the Page !! ...