Time remaining
:
:
Test Status
CSHARPRANDOMTEST
Ques 1 :
How many web.config files that can be there an ASP.NET application?
(A) only one
(B) more than one
(C) only two
(D) upto 10
Ques 2 :
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 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 :
Which of the following are NOT true about .NET Framework?
1. It provides a consistent object-oriented programming environment whether
object code is stored and executed locally, executed locally but Internet-
distributed, or executed remotely.
2.It provides a code-execution environment that minimizes software deployment and versioning conflicts.
3.It provides a code-execution environment that promotes safe execution of code, including code created by an
unknown or semi-trusted third party.
4.It provides different programming models for Windows-based applications and Web-based applications.
5.It provides an event driven programming model for building Windows Device Drivers.
(A) 1, 2
(B) 2, 4
(C) 4, 5
(D) 1, 2, 4
Ques 5 :
Which of the following statements are correct about the C#.NET code snippet given below?
class Sample
{
static int i;
int j;
public void proc1()
{
i = 11;
j = 22;
}
public static void proc2()
{
i = 1;
j = 2;
}
static Sample()
{
i = 0;
j = 0;
}
}
(A) j can be initialized in proc2().
(B) i cannot be initialized in proc1().
(C) proc1() can initialize i as well as j.
(D) proc2() can initialize i as well as j.
Ques 6 :
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 7 :
Which of the following characters ends every C# statement?
(A) Period (.)
(B) Colon (:)
(C) Semicolon (;)
(D) Comma (,)
Ques 8 :
How can we sort the elements of the array in descending order?
(A) By calling Sortdescending() method
(B) By calling Sort() method
(C) By calling Sort() and then Reverse() methods
(D) By calling Sortreverse() method
Ques 9 :
A variable which is declared inside a method is called a________variable
(A) Local
(B) Private
(C) Static
(D) Serial
Ques 10 :
Is it possible to change the value of a variable while debugging a C# application?
(A) Yes
(B) No
Ques 11 :
___________________ 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 12 :
What is the difference between Convert.ToString(str) and str.ToString() method?
(A) Convert.ToString(str) function handles NULL while str.ToString() does not. It will throw a NULL reference exception.
(B) str.ToString() function handles NULL while Convert.ToString(str) does not. It will throw a NULL reference exception.
(C) Both can handle NULL
(D) None can Handle NULL
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 :
An assembly is
(A) declarative syntax of Java
(B) properties of c#
(C) events Of c#
(D) A collection of files that appear to the programmer to be a single DLL or EXE.
Ques 15 :
The company uses Visual Studio .NET as its application development platform. You are creating a strong named MyAssembly that will be used in several applications. The assembly will be rebuilt frequently during the development cycle. You must ensure that every time MyAssembly is rebuilt it works properly with all applications that use it. You are required to configure the computer on which you develop the assembly such that each application uses the latest build of MyAssembly. Which of the following actions will you take to accomplish the task?
(A) Add the following element to the configuration file of every application that uses the assembly
(B) Add the following element to the machine configuration file
(C) To point to the build output directory for the strong named assembly, create a DEVPATH environment variable.
(D) B and C
Ques 16 :
Which method do you invoke on the SQLDataAdapter object to load your dataset with data?
(A) Update
(B) Fill
(C) Gather
(D) Load
Ques 17 :
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 18 :
If a method is marked as protected internal who can access it?
(A) Classes within the same assembly, and classes derived from the declaring class.
(B) Internal methods can be only be called using reflection.
(C) Only methods that are in the same class as the method in question.
(D) Classes that are both in the same assembly and derived from the declaring class.
Ques 19 :
int keyword targets to which .Net type?
(A) System.Int8
(B) System.Int16
(C) System.Int32
(D) System.Int64
Ques 20 :
Is it possible to invoke Garbage Collector explicitly?
(A) Yes
(B) No
Submit Answer
Don't Refresh the Page !! ...