Dot Net SE AD MCQ


Dot net SE AD multiple choice questions | Dot net SE AD Objective type questions | Dot Net SE AD Accenture Dumps | DOT Net SE AD Question Answers | Dot Net Dumps

1) Identify the Reference types ?
(Choose two correct options)
a) string
b) delegate
c) enum
d) int
Ans: string, delegate
2) What will the output for the following code ?
class SampleClass
{
public static int GetAdd(int num1,int num2)
{
Console.WriteLine(“Addition is {0}”,(num1+num2));
return (num1 + num2) / 2;
}
public static int GetMul(int Val1,int Val2)
{
Console.WriteLine(“Multiplication is {0}”,(Val1*Val2));
return (Val1 * Val2) / 2;
}
}
class Program
{
delegate int TestDelegate(int n1, int n2);
static void Main(string[] args)
{
TestDelegate testDelegate = null;

testDelegate += SampleClass.GetAdd;
testDelegate += SampleClass.GetMul;
Console.WriteLine(“Final Result {0}”,testDelegate(4,4));
Console.ReadLine();
}
}
Ans:

Addition is 8
Multiplication is 16
Final Result 8

3) What will be the output for the following program?
using System;
class Program
{
static void Main(string[] args)
{
string fruit1 = “Banana”;
string fruit2 = fruit1.Replace(‘a’, ‘e’);
Console.WriteLine(fruit2);
Console.ReadLine();
}
}
Ans : Benene
4) What will be the output for the following program?
using System;
class DynamicDemo
{

static void Main(string[] args)
{
dynamic val1 = 500;
dynamic val2 = “jyothi”;
val2 = val1;
Console.WriteLine(“val1={0},val2={1}”,val1.GetType(),val2.GetType());
Console.ReadLine();
}
}
Ans : val1=System.Int32,val2=System.Int32
5 ) The class which doesn’t allow objects creation, but represents as parent class of child classes, is
known as __
a) Static
b) Sealed
c) Abstract
d) Partial
Ans: Abstract
6) Which of the following statements are TRUE about private Assembly?
a. Application which refers private assembly will have its own copy of the assembly
b. There will be only one copy of the assembly and it will be stored in Global assembly cache
options:

a) only a
b) only b
c) Both a and b
d) Neither a nor b
Ans :Both a and b
7) What will be the output for the following program?

NOTE : Line numbers are only for reference
class Program {
static void Method(int[] num)//line1
{
num[0] = 11;
}
static void Main()
{
int[] numbers = { 1, 2, 3 };
Method(numbers);//line2
Console.WriteLine(numbers[0]);
}
}
Ans : 11
8) What will be the output for the following program?
using System;
class A
{
public A()
{
Console.Write(“Class A” + ” “);
}
}
class B : A
{
public B()
{

Console.Write(“Class B” + ” “);
}
}
class ConstructorChainDemo
{
public static void Main(string[] args)
{
A bobj = new A();
}
}
options:
a) class A class B
b) class B class A
c) class B
d) class A
Ans: class A

9) Consider the following languages specifications which must be met by a programming component
to be re-used across multiple languages:
Instance members must be accessed only with the help of objects
The above specifications is provided by ?
a) Common Language Specifications(CLS)
b) Common Type System(CTS)
c) Attributes
d) JIT Compiler
Ans: CLS
10) Method overloading is a concept related to?
[Choose the most appropriate option]

a) dynamic polymorphism
b) static polymorphism
c) abstract class
d) encapsulation
Ans: static polymorphism
11) What will be the output for the following program?
using System;
class StaticDemo
{
private static int number = 100;
static StaticDemo()
{
number = number + 1;
}
public StaticDemo()
{
number = number + 1;
Console.Write(number + ” ” );
}
}
class NormalConstructionProgram
{
static void Main(string[] args)
{
StaticDemo obj= new StaticDemo();
}
}

options:
a) 100
b) 101
c) 102
d) 103
Ans: 102
12) Which of the following statements are TRUE about generics?
[Choose two correct options]
a) Generics does not need to perform boxing
b) Generics does not need to perform unboxing
c) Explicit typecasting is required in generics
d) a generic declared to hold integer values can hold both integer and string values
Ans: Generics does not need to perform boxing
13) _ class is used to find out object’s metadata i.e, methods, fields, properties at
a) System.Type
b) System.Reflection
c) System.Assembly
d) System.String
Ans: System.Type
14) What will be the output for the following program?
class Test
{
int num1 = 10;
public Test()
{
Console.Write(num1 + ” “);
}

public Test(int num2)
{
Console.Write(num2);
}
}
class program
{
public static void Main()
{
Test obj = new Test();
Test obj1 = new Test(10);
}
}
Ans : 10 10
15) Which of the below option is FALSE related to abstract class?
[Choose most appropriate option]
a) Abstract class can contain constructors
b) Abstract class can be instantiated
c) Abstract class can have abstract and non-abstract methods
Ans: Abstract class can be instantiated
16) What will be the output for the following program?
using System.Collections;
using System;
public class program
{
public static void Main(string[] args)
{

ArrayList fruits = new ArrayList(){“Apple”, “Banana”, “Orange” };
fruits.Insert(2, “Grapes”);
fruits.Add(“Bilberry”);
foreach(var item in fruits)
{
Console.WriteLine(item);
}
}
Ans : Apple Banana Grapes Orange Bilberry
17) using System;
class Program
{
static void Method(int[] num)
{
num[0]=11;
}
static void Main()
{
int[] numbers={1, 2, 3};
Method(numbers);
Console.WriteLine(numbers[0]);
}
Options:
a) 11
b) 1
c) compilation error at line 2
d) 11 2 3

Answer: 11
18) Identify the keyword used to specify that the class cannot participate in inheritance?
a) abstract
b) sealed
c) virtual
d) override
Answer: b) Sealed
19) using System;
public class StaticTest
{
static int num1=55;
public void Display(int num)
{
num1 += num;
Console.WriteLine(“Value of num1 is “+ num1);
}
}
public class Program
{
static void Main()
{
StaticTest obj1= new StaticTest();
obj1.Display(10);
StaticTest obj2= new StaticTest();
obj2.Display(20);
}
}

Answer: Value of num1 is 65 Value of num1 is 85
20) using System;
class Program
{
static void Main()
{
int[] first = {6, 7};
int[] second = {1, 2, 3, 4, 5};
second = first;
foreach(int j in second)
{
Console.WriteLine(j);
}
}
}
Answer: Prints 6 7
21) Which access specifier can be accessed anywhere in the Assembly but not outside the Assembly?
a) internal
b) public
c) private
d) protected
Answer: a) internal
22) Which Feature of C# is Demonstrated by the following code ?
using System;
class Employee
{
int id;

public int Id
{
get { return id;}
internal set { id = value;}
}
}
Options:
a) Automatic properties
b) Read only property
c) Abstraction
d) Asymmetric property
Answer: Asymmetric property
23) Predict the output of the following code:
enum Numbers
One=100,
Two, Three
}
class Program
static void Main()
Console.WriteLine((int)Numbers. Three );
Answer : 102
24) What will be the output of following code
int? num= 100; num= nutt
Console.WriteLine(num.GetValueOrDefault()
Answer: 0(zero)
25) class Program
{

static void Method(int[] num) {
num(0] = 11
}
static void Main()
{
Int[] numbers = {1,2,3}
Method(numbers)
Console.WriteLine(number[0]);
}}
Answer = 1 1

26) using System;
class Demo (
static int x;
int y
Demo(){
X++;
Y++;
Console.Write(x +” “ + y + ” “);
}
static void Main(string[] args)
{
Demo d1 = new Demo();
Demo d2 = new Demo();
}
Answer = 1 1 2 1
27) class Program

{
static void Main()
{
int first = (6, 7);
int[] second = {1, 2, 3, 4, 5);
second = first;
foreach(int j in second)
{
Console.WriteLine(j);
}}}
Answer – 6,7
28) using System:
class Program{
void Method(int a, int b, out int c, ref int d)
{
a = a +1:
b= b+ 2;
c = a + b;
d = c -1;
}
static void Main()
{
int first = 10, second =20, third, fourth = 30 ;
Program p = new Program()
p. Method(first, second, out third, ref fourth);
Console.WriteLine(“{0} (1) (2) (3), first, second,third, fourth);
}}

Answer – 10 20 33 32
29) class Test
{
int num1 = 10;
public Test()
{
Console.Write(num1+” “);
}
public Test(int num2)
{
Console.Write(num2);
}
}
class Program
{
public static void Main()
{
Test obj = new Test():
Test obj1 = new Test(10):
}}
Answer – 10 10

30)using System;
Public class StaticTest
{
Static int num1=55;
Public void Display(int num)

{
num1 += num;
Console.WriteLine(“Value of num1 is “ + num1);
}}
Public class Program
{
Static void Main()
{
Static void main()
{
StaticTest obj1 = new StaticTest();
Obj1.Display(10);
StaticTest obj2 = new StaticTest();
Obj2.Display(20);
}}
Answer – value of num1 is 65 value of num1 is 85

31) using system:
class NamedParameterExample
{
static void Method(int num1, int num2, int num3=30)
{
Console.WriteLine(“num1=(0), num2=(1), num3={2}”, num1, num2, num3);
}
public static void Main()
{
Method(num2: 20, num1: 10, num3:100);

}}
Answer – num1= 10, num2=20,num3=100
32)using System;
Class DynamicDemo
{
Public static void main(string[] args)
{
Dynamic val1 =500;
Dynamic val2=”jyothi”;
Val2=val1;
Console.WriteLine(“val1={0},val2={1}”,val1.GetType(),val2.GetType());
}
}
Answer- val1=System.Int32,val2=System.Int32
33)using System;
using System.Collections;
namespace ConsoleApplicationDemo
{
class Program
{
static void Main(string[] args)
{
ArrayList myList = new ArrayList();
myList.Add(32);
myList.Add(12);
myList.Add(22);
myList.Sort();

for(int index=0; index<myList.Count; index++)
{
Console.Write(myList[index] + “\t”);
}
}
}
}
Answer: 12 22 32
34)using System;
namespace Test_App
{
class SampleClass
{
public void GreetUser()
{
Console.WriteLine(“Hello Customer”);
}
static void Main(string[] args)
{
global::Test_App.SampleClass sc= new SampleClass();
sc.GreetUser();
Console.ReadLine();
}
}
}
class SampleClass
{

public void GreetUser()
{
Console.WriteLine(“Hello Premium Customer”);
}
}
Answer: Hello Customer
35) __ class is used to find out object’s Metadata i.e, methods, fields, properties at
runtime
a) System Type
b) System Reflection
c) System Assembly
d) System String
Answer: System Reflection
36) Which of the following Attribute should be used to indicate the property must NOT be serialized
while using .JSON serializer ?
a) XMLIgnore
b) IgnoreDataMember
c) IgnoreProperty
d) JsonIgnore
Answer: JsonIgnore
37) using System;
public class program
{
public static void Main(string[] args)
{
try
{
int num1=5;

Console.WriteLine(num1);
try
{
int num3= 5;
int num4= 0;
int num5= num3/num4;
Console.WriteLine(num4);
}
catch (DivideByZeroException ex)
{
Console.WriteLine(“Divide by zero Exception”);
}
catch (Exception ex)
{
Console.WriteLine(“Inner Catch”);
}
}
catch (Exception ex)
{
Console.WriteLine(“Outer Catch”);
}
}

}
Answer: 5 Divide by Zero Exception
38) Which serialization serializes even private access specifier properties
a) XML

b) Binary
c) JSON
d) None of the given choices
Answer: Binary
39) Method overriding is a concept releated to ?
a) Dynamic Polymosphism
b) static polymosphism
c) abstract class
d) encapsulation
Answer: Dynamic Polymorsphism
40) Which of the following is Generic collection ?
a) List
b) ArrayList
c) Hash Table
d) String Collection
Answer: List
41) Which of the following is FALSE about Interface ?
a) The methods inside interface are abstract
b) Interface can have constructors
c) Interface can contain one or more methods
d) interface methods by default are public
Answer: Interface can have constructors
42) using System;
int index;
int value = 100;
int[] arr = new int[10];
try{

Console.Write(“Enter a number: “);
index = Convert.ToInt32(Console.ReadLine());
arr[index]= value;
}
catch (FormatException e)
{
Console.Write(“Bad Format “);
}
catch (IndexOutOfRangeException e)
{
Console.Write(“Index out of bounds “);
}
{
Console.Write(“Remaining program”);
}
Answer: Bad Format Remaining program
43) using System;
class ConstructorDemo
{
private int number= 300;
public ConstructorDemo()
{
number=number+1;
Console.Write(number+”\t”);
}
public ConstructorDemo(int num)
{

number+=num;
Console.Write(number+”\t”);
}
}
class NormalConstructorProgram
{
static void Main(string[] args)
{
ConstructorDemo obj= new ConstructorDemo();
ConstructorDemo obj1= new ConstructorDemo(200);
}
}
Answer: 301 500

1)
I
dent
i
f
yt
heRef
er
encet
y
pes-st
r
i
ng,
del
egat
e
2)
Test
Del
egat
et
est
Del
egat
e=nul
l
-Addi
t
i
oni
s8
Mul
t
i
pl
i
cat
i
oni
s16
Fi
nal
Resul
t8
3)
st
r
i
ngf
r
ui
t
1=”
Banana”-Benene
4)
cl
assDy
nami
cDemo-v
al
1=Sy
st
em.
I
nt
32,
v
al
2=Sy
st
em.
I
nt
32
5)
Thecl
asswhi
chdoesn’
tal
l
owobj
ect
scr
eat
i
on-abst
r
act
6)
cl
asspr
ogr
am i
nt
[
]number
s={
1,
2,
3}-11
7)
usi
ngsy
st
em cl
assA-cl
assA
8)
Met
hodov
er
l
oadi
ngi
saconceptr
el
at
edt
o-st
at
i
cpol
y
mor
phi
sm
9)
pr
i
v
at
est
at
i
ci
ntnumber=100-102
10)
cl
assi
susedt
of
i
ndoutobj
ect

smet
adat
a-Sy
st
em.
Ty
pe
11)
Testobj
1=newTest
(
10)-1010
12)
FALSEr
el
at
edt
oabst
r
actcl
ass-Abst
r
actcl
asscanbei
nst
ant
i
at
ed
13)
f
r
ui
t
s.
I
nser
t
(
2,

Gr
apes”
)
;
-Appl
eBananaGr
apesOr
angeBi
l
ber
r
y
14)
i
nt
[
]number
s={
1,
2,
3}
;
-11
15)
t
hecl
asscannotpar
t
i
ci
pat
ei
ni
nher
i
t
ance-Seal
ed
16)
obj
1.
Di
spl
ay
(
10)-Val
ueofnum1i
s65Val
ueofnum1i
s85
17)
i
nt
[
]f
i
r
st={
6,
7}-Pr
i
nt67
18)
accessspeci
f
i
ercanbeaccessedany
wher
e-i
nt
er
nal
19)
cl
assEmpl
oy
ee-Asy
mmet
r
i
cpr
oper
t
y
20)
enum Number
s-102
21)
i
nt
?num=100-0
22)
Demod1=newDemo(
)
;
-1121
23)
i
ntf
i
r
st=10,
second=20,
t
hi
r
d,
f
our
t
h=30- 10203332
24)
cl
assNamedPar
amet
er
Exampl
e-num1=10,
num2=20,
num3=100
25)
Ar
r
ay
Li
stmy
Li
st=newAr
r
ay
Li
st
(
)
;
-122232
26)
publ
i
cv
oi
dGr
eet
User
(
)-Hel
l
oCust
omer
27)
at
t
r
i
but
eshoul
dbeusedt
oi
ndi
cat
eJSONi
gnor
e
28)
i
ntnum5=num3/
num4-5Di
v
i
debyZer
oEx
cept
i
on
29)
Met
hodov
er
r
i
di
ng-Dy
nami
cPol
y
mor
phi
sm
30)
f
al
seabouti
nnt
er
f
ace-I
nt
er
f
acecanhav
econst
r
uct
or
s
31)
st
r
i
ngl
i
ke”
abc”
?

  • BadFor
    matRemai
    ni
    ngpr
    ogr
    am
    32)
    cl
    assCOnst
    r
    uct
    or
    Demo-301500
    33)
    Gener
    i
    cCol
    l
    ect
    i
    on-Li
    st
    34)
    I
    nst
    ancemember
    smustbeaccessed-CLS 1. int a = 20;
    a++;
    a += –a;
    console.WriteLine(“value of a {0}”,a);
    a. value 41
    b. value 40
    c. value 39
    d. value 42
    ans :41
  1. strong name assembly can refer only strong name assembly (T/F)
    True.
    Read this notes
    A strong name consists of the assembly’s identity—its simple text name, version number, and culture information (if
    provided)—plus a public key and a digital signature. It is generated from an assembly file (the file that contains the
    assembly manifest, which in turn contains the names and hashes of all the files that make up the assembly), using the
    corresponding private key. Microsoft® Visual Studio® .NET and other development tools provided in the Windows
    Software Development Kit (SDK) can assign strong names to an assembly. Assemblies with the same strong name are
    expected to be identical.
    You can ensure that a name is globally unique by signing an assembly with a strong name. In particular, strong names
    satisfy the following requirements:

Strong names guarantee name uniqueness by relying on unique key pairs. No one can generate the same
assembly name that you can, because an assembly generated with one private key has a different name than an
assembly generated with another private key.

Strong names protect the version lineage of an assembly. A strong name can ensure that no one can produce a
subsequent version of your assembly. Users can be sure that a version of the assembly they are loading comes
from the same publisher that created the version the application was built with.

Strong names provide a strong integrity check. Passing the .NET Framework security checks guarantees that the
contents of the assembly have not been changed since it was built. Note, however, that strong names in and of
themselves do not imply a level of trust like that provided, for example, by a digital signature and supporting
certificate.

When you reference a strong-named assembly, you expect to get certain benefits, such as versioning and naming
protection. If the strong-named assembly then references an assembly with a simple name, which does not have these
benefits, you lose the benefits you would derive from using a strong-named assembly and revert to DLL conflicts.

Therefore, strong-named assemblies can only reference
other strong-named assemblies

3. Default scope of the class is public (T/F)
False.

  1. what is the default access level of the class?
    Private
  2. which of the following is not used to create the .net domain
    a. ASP.NET
    b. IIS
    c. Internet Explorer
    d. Windows Shell
    DataBase/Brijesh: ASP.Net
    Mam:Windows Shell
    Domain is created for Web Application. For creating domain ASP.Net, IIS and IE is required.
  3. Which keyword denotes the reference to an object of current class
    a.this()
    b. inIt
    c.out
    d.none of these
    this
  4. All .net code have to be CLS complaint (T/F)
    Brijesh-True

8 In which namespace are all collection class located ?

a.system.configuration
b.system.collection.
c.system.codeDom
d.system.componentmodel
b

  1. What is true about destuctors ?
    a. destuctor cannot be used with structs
    b. you cannot pass arguments to destuctors c. destuctor doesn’t have the same name of the class
    d. destructor can be overloaded
    Ans : B
  2. all elements of an interface
    Ans : public
  3. Constructor for the class Helloworld
    Ans : public Helloworld();
    12.multiple interfaces can be inherited (T/F) Ans :T
    13.Base class for all arithamatic operation
    Ans: System.ArithamaticException
  4. The entity with some characteristics and behaviour
    Ans: object
    15.—————-is the execution engine for .net
    Ans: CLR
  5. which one is true about Visual source safe question..
    a.undo check out rollback
    b.we can access vss directly through vb.net 2005
    c.one more point
    d. all the above
    Ans : All the above
  6. Relation between parent and child.. (inheritance..)
    Note : the question from knowledge check
    a. parent object cannot be assigned to a child object directly without casting ( child c! = new
    parent();
    b. assigning child instance tto parent obj = (parent p = new child)
    c. casting a child obj to child obj and assigning it to parent obj(parent p = (child)childobject;)
    d. casting a parent object to a child object and assigining it to a child object will not throw any
    errors
    (child c = (child)parent object);
    e. all the above
    Ans : All the above
  7. which operator is used to implement interface Ans : operator
    19which modifier can be used in which the access is limited to that class and thetypes of its sub class
    Ans : protected
    20.static method cannot be virtual (T/F)
    True
  8. Type of abstraction
    a. data abstraction
    b. class abstraction
    c. both option a and option b
    Abstraction is 3 types : Data Abstraction, Functional Abstraction and Object Abstraction
  9. class Test
    {
    string s = “Test”;
    string t = string.copy(s);
    Console.writeline ( s== t)
    Console.writeline ((object)s == (object)t); }}
    a.True True
    b.True False
    c.False False
    d.False True
    b – True False
  10. Keyword thatis used to inform the compiler that a variable is initialized with in a method
    a. this
    b. out
    c. Init only
    d. None of these
    Out
  11. using system
    class A
    {
    Public static int X = B.Y +1;
    } Class B
    {
    Public static int Y = A.X+1;
    Static void Main()
    {
    Console.writeline (“x = {0}, y = {1} “,A.X,B.Y);
    }
    }
    a.
    b.
    c.
    d.
    e.
    f.

X =1 Y= 1
X = 2 Y =1
X=0 Y=0
Will not execute becose circular ref in static field initialize
X = 1, Y = 2
Ans is X = 1, Y = 2

  1. class Test
    {
    Int I;
    Bool t is false
    If ( I == 0)
    {
    Console.writeline (“true…”);
    }
    Else
    {
    Console.writeline (“false..”)
    }
    It will give error as I is not initialized.

26.which of the following is true about this operator
Ans: the this member can never be declared it is automatically implied when you create a
class
27.which of the following accept input from the user
Ans: console.readline();
28.which one of the following code samples write out “C:\WINNT\System32” to the console.
Ans : “C:\WINNT\System32”

29.what is the purpose of sealed class
Ans : it prevent inheritance
30.which of the following variable share a single copy of the object
Ans :static
31.a question about oopss
Ans : one option contains polymorphism,encapsulation,inheritance
Another option stared with object
These two are the answer for this question
32.which of the statements is/are false (choose the best option)
a. private methods are inherited in derived class
b. interface methods can be declared as virtual
c. static methods cannot be virtual
d. the signature of the override method must remain same
B and A if they have given Private methods are inherited in derived class.

  1. serive that allow code to work functions and structures that has been exported WIN32.dll
    a.delegate
    b.platform invocation
    c.COM interoperability
    Ans :platform invocation
    Did Not understand this question
    34.A question from Tag Navigator
    All options contains info about sourse window and code window
    Ans : All the Above..
    35.A try block must contain Finally (T/F)
    Ans : False
    36.A question from method overloading
    Options contains argument,signature,access specifier.
    All these options are bulleted in the text book
    Ans : All the above
    37.one program which contains
    S=3;
    console.writeline (s+85.ToString())
    Ans : 385
    38.Keyword that is used to inform the compiler that a variable is initialized in a method
    Ans : out Question wording

If I have to alter a string many times, such as
mutliple
concatenations, what class should I use?

What is the output of the following code snippet?
int i=0;
i=2.5*5.05;
Console.WriteLine(“{0}”, i);
It is possible for a derived class to define a
member that has the
same name as the member in its base class.
Which of the following
keywords would you use if your intent is to hide
the base class member?

Possible outcomes

Outcome(s) chosen

Actual
score

1 – 0 String
2 – 1 StringBuilder
3 – 2 Either String
or StringBuilder can
be used.

2 – 1 StringBuilder

1

1 – 0 7.55
2 – 1 7.00
3 – 2 cannot
implicitly convert
type ‘double’ to
4 – 3 7.5

3 – 2 cannot
implicitly convert
type ‘double’ to

1

1 – 0 virtual
2 – 1 sealed
3 – 2 ref
4 – 3 new

1 – 0 virtual

0

1 – 0 Add,Sub,Mul
and Div
2 – 1 Mul and Div
3 – 2 Add and Sub
4 – 3 Add,Mul and
Div

3 – 2 Add and Sub

0

1 – 0 Indexer
2 – 1 Delegate
3 – 2 Method

1 – 0 Indexer

1

1 – 0 Compile time
error
2 – 1 Two Not a
Digit
3 – 2 One Two Not
a Digit
4 – 3 Two

1 – 0 Compile time
error

1

1 – 0 Array is a
standard array
whereas ArrayList
2 – 1 Array is a
fixed array whereas
ArrayList is
3 – 2 Array can be

2 – 1 Array is a
fixed array
whereas ArrayList
is

1

Which are the members of interface IListBox in
the following code
snippet?
public interface IControl
{
void Add();
void Sub();
}
public interface IListBox:IControl
{
void Mul();
void Div();
}
What does the following statement represent?
public object this[int i]
In C#,find the output of the following when the
value of iNumber is
2
switch(iNumber) {
case 1: Console.Write (“One”);
case 2: Console.Write(“Two”);
default : Console.Write(“Not a Digit”);
}

What is the difference between Array and
ArrayList Classes?

resized whereas
ArrayList can’
4 – 3 Both are same
What is the output of the following code snippet?
int i = 0;
while(i++ <10);
Console.WriteLine(“i = ” + i);

1 – 0 Compile Error
2 – 1 Runtime Error
3 – 2 10
4 – 3 11

3 – 2 10

0

Which of the following statement/s is TRUE?
i)Thread class is used to create a new thread
object.
ii)Thread constructor needs a delegate of
ThreadStart type.

1 – 0 Only (i)
3 – 2 Both (i) and
2 – 1 Only (ii)
(ii)
3 – 2 Both (i) and (ii)

1

__ allows building assemblies at run
time

1 – 0 Reflection
2 – 1 Serialization
3 – 2 Marshalling

1 – 0 Reflection

1

1 – 0 12
2 – 1 34
3 – 2 Compiler error
4 – 3 Runtime error

1 – 0 12

1

1 – 0 Runtime error
2 – 1 Compilation
error
3 – 2 1050
4 – 3 1000

2 – 1 Compilation
error

0

What will be the output of the following code
snippet?
int iNum=12;
object oVal = iNum;
iNum =34;
Console.WriteLine(oVal);
What will the output of following code snippet?
public interface Employee {
int GetSalary();
void GiveRaise(int amount);
}
public struct Clerk : Employee {
private int salary;
public Clerk(int salary) {
this.salary = salary;
}
public int GetSalary() {
return salary;
}
public void GiveRaise(int amount) {
salary += amount;
}
}
class Test {
static void Main(string[] args) {
Clerk c = new Clerk(1000);
((Employee)c).GiveRaise(50);
System.Console.WriteLine(c.GetSalary());
}
}

Question wording

Possible outcomes

Outcome(s) chosen

Actual
score

1 – 0 For defining named
constants
2 – 1 For defining symbols
3 – 2 For defining variables
4 – 3 For defining methods

1 – 0 For defining named
constants

0

1 – 0 Virtual method
2 – 1 Self referencing method
3 – 2 Indexer
4 – 3 Propertie

3 – 2 Indexer

1

1 – 0 Private
2 – 1 Public
3 – 2 Protected
4 – 3 Friend

2 – 1 Public

1

1 – 0 Only(i)
2 – 1 Only(ii)
3 – 2 Both (i) and(ii)
4 – 3 None of (i) and (ii)

4 – 3 None of (i) and (ii)

1

If a method is marked as protected internal who can
access it?

1 – 0 Classes that are both in
the same assembly
2 – 1 Only methods that are in
the same class as
3 – 2 Internal methods can be
only be called usin
4 – 3 Classes within the same
assembly, and class

4 – 3 Classes within the same
assembly, and class

1

Which parameter is declared without a modifier?

1 – 0 Output Parameters
2 – 1 Value Parameters
3 – 2 Reference Parameters
4 – 3 Params Parameters

4 – 3 Params Parameters

0

What is the difference between a const and readonly variable in C# ?

1 – 0 Both are same
2 – 1 const needs to be
initialized at the place
3 – 2 read only needs to be
initialized at the pl
4 – 3 const can be changed but
readonly cannot be

2 – 1 const needs to be
initialized at the place

1

What is the output of the following code snippet?
using System;
class Array
{
static void Main()
{
string[] arr = new string[4];
arr[0] = “str1” ;

1 – 0 str1 str2 str3 str4
2 – 1 error message is
displayed
3 – 2 arr[0]=[1] arr[0]=[1]
arr[0]=[1] arr[0]=[1]
4 – 3 arr[0]=str1 arr[1]=str2
arr[2]=str3 arr[3]=

4 – 3 arr[0]=str1 arr[1]=str2
arr[2]=str3 arr[3]=

1

What is the use of “#define” directive in C#?

What are the following types of function in a class
called
public return_type this[ type var]
{
get
{}
set
{}
}
What is the default accessibility modifier for
methods inside the interface?
Which of the following statement/s will result in
compilation error?
(i) enum Color1: byte {Red = 1, Green = 2, Blue =
3} ;
(ii)enum Color2: int {Red = 1, Green = 2, Blue =
3} ;

arr[1] = “str2” ;
arr[2] = “str3” ;
arr[3] = “str4” ;
for (int i=0; i < 4; i++)
Console.WriteLine (“arr[{0}] = {1}”, i , arr[i] );
}
}
The File class, representing a file on disk, and the
Directory class, representing a directory, are found
in which namespace?

1 – 0 System.IO
2 – 1 System.Util
3 – 2 System.Management
4 – 3 System.Access

1 – 0 System.IO

1

Where are Value types stored :

1 – 0 In a Stack
2 – 1 In a Heap
3 – 2 In a Queue
4 – 3 In a Hash Table

1 – 0 In a Stack

1

Which of the following channel is fire-wall friendly?

1 – 0 Tcp
2 – 1 Http
3 – 2 Smtp

2 – 1 Http

1

In C#, a technique used to stream(linear sequence)
data is known as

1 – 0 Wading
2 – 1 Serialization.
3 – 2 Crunching.
4 – 3 Marshalling.

2 – 1 Serialization.

1

Why is the given code snippet is not correct.
try
{

}
catch (Exception) {…}
catch (IOException) {…}

1 – 0 We can’t use the type of
IOException class
2 – 1 The code generates a
compile time error bec
3 – 2 The type of class
Exception can’t be used a

2 – 1 The code generates a
compile time error bec

1

_ binding is possible through Reflection.

1 – 0 Late
2 – 1 Early
3 – 2 Both Late and Early

1 – 0 Late

1

finally ‘ block in the Try..Catch statement will
execute

1 – 0 when there is an
exception in the try..catc
2 – 1 when there is exception in
the catch block
3 – 2 when there is no
exception
4 – 3 irrespective of whether an
exception occurs

4 – 3 irrespective of whether
an exception occurs

1

1 – 0 D & E.
2 – 1 D.
3 – 2 A & C.
4 – 3 B.

2 – 1 D.

1

Which of A, B, C, D, E is/are wrong ?
A.
static int Main(string []args)
{
//block of statements
return ( 0 );
}
B.
static void Main()
{
//block of statements
return;
}

C.
static int Main()
{
//block of statements
return 1;
}
D.
static uint Main(string[]str)
{
//block of statements
return 0;
}
E.
static public void Main(System.String [] s)
{
//block of statements
}
Choose the correct alternative for the given code
snippet.
1 – 0 All data members of the
class will be seria
2 – 2 All data members except
iAge of the class w
3 – 3 Invalid Syntax.

2 – 2 All data members except
iAge of the class w

1

In C#, the technique used to control access to a
resource so that
only one thread at a time can modify that resource is
called

1 – 0 Logging
2 – 1 Transaction Processing
3 – 2 Synchronization
4 – 3 Marshalling

3 – 2 Synchronization

1

Method used to overload the operator must be a
__ method

1 – 0 static
2 – 1 non-static
3 – 2 either static or non static

1 – 0 static

1

1 – 0 static keyword should not
be given
2 – 1 this keyword should not
be included for a s
3 – 2 There is no public method
4 – 3 There is no private
keyword for int variabl

2 – 1 this keyword should not
be included for a s

1

In C# multiline comments are implemented by

1 – 0 // Data //
2 – 1 /* Data */
3 – 2 — Data —

2 – 1 /* Data */

1

Boxing is

1 – 0 The conversion of value
type to reference t
2 – 1 The conversion of
reference type to value t
3 – 2 Method of storing on the
heap

1 – 0 The conversion of value
type to reference t

1

[Serializable] public class MyClass
{
int iId;
string sName;
[NonSerialized] int iAge;
}

What is wrong in the given class definition?
class A
{
int i;
static void test()
{
this.i = 100;
}
}

4 – 3 Method of storing on the
stack
Consider the following statements:
i)XCOPY Deployment works only if the .NET
framework is installed on every target machine.
ii)Windows Installer creates a .msm file for Merge
Module type of project.

1 – 0 only i) is true
2 – 1 only ii) is true
3 – 2 both i) and ii) are false
4 – 3 both i) and ii) are true

4 – 3 both i) and ii) are true

1

In windows application the class “Form1” is inherited
from

1 – 0 System.Windows.Form
2-1
System.Windows.Forms.Form
2-1
3-2
1
System.Windows.Forms.Form
System.Windows.Forms.Form1
4-3
System.Forms.Window.Form

Which of the following statement/s is FALSE?
(i)A property denotes a storage location.
(ii) A property can have either of get or set accessor.

1 – 0 Only(i)
2 – 1 Only(ii)
3 – 2 Both (i) and (ii)

1 – 0 Only(i)

1

1 – 0 16

1

C# denies support to which of the following?

1 – 0 Multiple Interface
2 – 1 Multiple Inheritance
3 – 2 Multilevel Inheritance
4 – 3 Multi Threading

2 – 1 Multiple Inheritance

1

State which of the following statement is FALSE

1 – 0 Attribute provide
additional information ab
2 – 1 Attribute can accept
parameters.
3 – 2 Custom attributes cannot
be created.
4 – 3 Target for attribute can be
specified.

3 – 2 Custom attributes
cannot be created.

1

A .NET application will not terminate ,if __
thread is
running.

1 – 0 Background
2 – 1 Foreground
3 – 2 Either background or
foreground.

2 – 1 Foreground

1

An Assembly consists of :

1 – 0 manifest
2 – 1 metadata
3 – 2 program code &
resources.
4 – 3 All of the choices

4 – 3 All of the choices

1

What is the output of the following code snippet?
int var1 = 0;
int var2 = 0;
int[] arr = new int [] {0,1,2,5,7,8,11};
foreach (int ctr in arr)
{
if (ctr%2 == 0)
var1++;
else
{

1 – 0 0,2,8
2 – 1 ctr
3 – 2 1,5,7,11
4 – 3 0,1,2,5,7,8,11

3 – 2 1,5,7,11

1

What would be the output of the following program?

1 – 0 16
2-10
ArrayList myArrayList = new ArrayList();
3 – 2 ArgumentNullException,
Console.WriteLine(myArrayList.Capacity.ToString()); since the ArrayList

var2++;
Console.WriteLine(ctr);
}
}
Remotable objects are the objects that can be
marshaled across the
__.

1 – 0 Application Domains
2 – 1 Context Boundaries
3 – 2 Processes

1 – 0 Application Domains

1

What is the feature of a namespace?

1 – 0 You can save a
namespace with the .cp exten
2 – 1 You can refer to an alias
only in the names
3 – 2 You can declare two or
more aliases for the
4 – 3 You can refer to a
namespace only by using

3 – 2 You can declare two or
more aliases for the

0

Which of the following implements the functionality
of a Windows Service?

1 – 0 A service control program
2 – 1 A service program
3 – 2 A service configuration
program

2 – 1 A service program

1

What is the order of constructors called in a
inheritance hierarchy?

1 – 0 Starts with Derived class
ends at Base clas
2 – 1 Starts with Base class
ends at Derived clas
3 – 2 The constructor of base
will not be called
4 – 3 Randomly

2 – 1 Starts with Base class
ends at Derived clas

1

Multi-casting is

1 – 0 Multicasting is about
typecasting for multi
2 – 1 Multicasting is about
cascading of typecast
3 – 2 Multicasting is about
invoking multiple met
4 – 3 Multicasting is about
invoking multiple del

3 – 2 Multicasting is about
invoking multiple met

1

Which compiler switch creates an xml file from the
xml comments in the files in an assembly?

1 – 0 /text
2 – 1 /doc
3 – 2 /xml
4 – 3 /help

2 – 1 /doc

1

How do you return more than one value in a
function?

1 – 0 using return keyword
2 – 1 using multiple return
keywords
3 – 2 using out/ ref parameters
4 – 3 not possible

3 – 2 using out/ ref
parameters

1

What is the base .NET class from which all classes
are derived from?

1 – 0 System.Collections
2 – 1 System.Data
3 – 2 System.ComponentModel
4 – 3 System.Object

4 – 3 System.Object

1

__ allows building assemblies at run time

1 – 0 Reflection
2 – 1 Serialization
3 – 2 Marshalling

1 – 0 Reflection

1

What are jagged arrays in C# ?

1 – 0 Multiple dimension arrays
in which every ro
2 – 1 Multiple dimension arrays

2 – 1 Multiple dimension
arrays in which rows are

1

in which rows are
3 – 2 Multiple dimension arrays
in which number o
4 – 3 Multiple dimension arrays
which have fixed

What happens when you include a Throw statement
in the catch block?

1 – 0 Compilation Error
2 – 1 Current Exception is rethrown
3 – 2 Runtime Error
4 – 3 Execution is abandoned

2 – 1 Current Exception is rethrown

1

How are the methods in C# overloaded?

1 – 0 By having the same
method name and specifyi
2 – 1 By giving different method
names and same n
3 – 2 By giving different method
names and same t

1 – 0 By having the same
method name and specifyi

1

What is the use of fixed statement?

1 – 0 To stop the Garbage
Collector to move the o
2 – 1 To dispose the object at
1 – 0 To stop the Garbage
the end of the def
Collector to move the o
3 – 2 To tell the Garbage
Collector to move the o
4 – 3 To fix the size of an object

1

Which modifier will you use to supress the compiler
error in the following code snippet?
abstract class Temporary
{
public abstract void function();
}
class Permanent: Temporary
{
public void function {}
}

1 – 0 override
2 – 1 protected
3 – 2 abstract
4 – 3 sealed

1 – 0 override

1

4 – 3 both i) and ii) are true

1

4 – 3 System.Decimal 3.56

0

Consider the following statements:
1 – 0 only i) is true
i)A DOM parser reads the XML document, and
2 – 1 only ii) is true
creates an in-memory “tree” representation of XML
3 – 2 both i) and ii) are false
Document
4 – 3 both i) and ii) are true
ii)A SAX based parser reads the XML document and
generates events for each parsing step
What is the output of following C# code ?
using System;
class MainClass
{
static void Main( )
{
new MainClass().Display( 3.56 );
}
private void Display( float anArg )
{
Console.Write( “{0} {1}”, anArg.GetType(),
anArg );
}
double Display( double anArg )
{

1 – 0 System.Single 3.56
2 – 1 System.Float 3.56
3 – 2 System.Double 3.56
4 – 3 System.Decimal 3.56

Console.Write( “{0} {1}”, anArg.GetType(),
anArg );
return anArg;
}
public decimal Display( decimal anArg )
{
Console.Write( “{0} {1}”, anArg.GetType(),
anArg );
return anArg;
}
}

Delegate is

What is the output of the following code snippet?
struct Position
{
public int x, y;
public Position(int x, int y)
{
this.x = x;
this.y = y;
}
}

1 – 0 A strongly typed function
pointer.
2 – 1 A light weight thread or
process that can c
1 – 0 A strongly typed function
3 – 2 A reference to an object
pointer.
in a different pro
4 – 3 An inter-process message
channel.

1

1 – 0 35
2 – 1 10
3 – 2 100
4-30

1 – 0 35

1

1 – 0 static methods
2 – 1 objects
3 – 2 instance methods
4 – 3 events

2 – 1 objects

1

Position a = new Position(10, 10);
Position b = a;
a.x = 100;
b.x+=25;
Console.WriteLine(b.x);

Threads are:

1. What are the workflow authoring styles supported by WWF
Choose two most appropriate option
a) Base class library
b) Entity Style
c) Random Style
d) Data-driven style
Answer: a,d

  1. Identify the option which follows the correct order of Action
  2. Obtain the Data source.
  3. Execute the query.
  4. Create the query
    Choose most appropriate option
    a) 1,2,3
    b) 3,2,1
    c) 1,3,2
    d) 3,1,2
    Answer: c
  5. _ is a process in which a Web application accepts data from a user and processes it
    Choose most appropriate option.
    a) Page Init
    b) Page Load
    c) ASP.NET
    d) Page Posting
    Answer: d
  6. The class that encapsulates the event information should be derived from __
    Fill in the blank with an appropriate option
    a) System.EventArgs
    b) System.EventHandler
    c) System.Delegate
    d) System.componentModel.EventDescriptor
    Answer: a
  7. What are the different components of LINQ?
    Choose four appropriate options.
    a) LINQ to Objects
    b) LINQ to XML
    c) LINQ to SQL
    d) LINQ to DataSet
    e) LINQ to Datatable
    f) LINQ to DataRow
    Answer: a b c d
  8. The specific protocols and serialization formats that are used to support successful
    communication with the service
    Choose most appropriate option
    a) Operation Contract
    b) Service Contract
    c) Fault Contract d) Data Contract
    e) All of the above
    f) None of the above
    Answer: b
  9. Consider the enumeration below enum ThreadPriority { Lowest, BelowNormal, Normal,
    AboveNormal, Highest }
    Choose two appropriate options
    a) Threadpriority becomes important only when multiple threads are simultaneously active
    b) Lowest and Highest are not part of this enumeration
    c) A thread’s Priority property determines how much execution time it gets relative to other
    active threads in the operating system
    Answer: a c
  10. In Memory mapping, which class signifies a randomly accessed view of a memory-mapped file
    Choose most appropriate option
    a) MemoryMappedViewStream
    b) MemoryMappedViewAccesser
    c) CreateViewAccessor
    d) MemoryMappedFileView
    e) None of the above
    Answer: b
  11. In WPF, which layout control aligns the child controls to the edges of panel
    Choose most appropriate option
    a) StackPanel
    b) DockPanel
    c) GridPanel
    d) CanvasPanel
    e) None of the above
    Answer: b
  12. A _ expression is an anonymous function that can contain expressions and statements and
    can also be used to create delegates or expression tree types
    Choose the appropriate option
    a) Join
    b) XML
    c) Data
    d) lambda
    e) SQL
    Answer: d
  13. Which of the below are invalid serialization attributes ?
    Choose two most appropriate options.
    a) XMlRootElement
    b) XmlAttribute
    c) XmlElement
    d) XmlElementName
    Answer: a d
  14. __ provides a means of reading a forward-only stream of rows from a SQL server database.
    Fill in the blank with an appropriate option
    a) SqlDataReader b) Dataset
    c) DataTable
    d) Dataview
    Answer: a
  15. During a Jagged Array practice session, Shruthi wrote following code:
    int[][] myarray- new int[][3];
    myarray [0]=new int[3];
    myarray [1]=new int[4];
    myarray [2]=new int[5];
    IDE continued to show an error for this Jagged Array construction According to you which line
    is causing this error?
    Choose most appropriate option
    a) int[][]myarray new int[][3];
    b) myarray [0]=new int[3];
    c) myarray [1]=new int[4];
    d) myarray [2]=new int[5];
    Answer: a
  16. Consider the following code and identify the attribute to be added to make the Name a
    property of Employee type in the data contract
    [DataContract]
    Public class Employee
    {
    private string m_Name;
    public string Name { get { return m_Name;} set { m_Name = value; } }
    }
    Choose most appropriate option
    a) [DataMember]
    b) [DataService]
    c) [DataAttribute]
    d) [DataProperty]
    Answer: a
  17. Please select the two correct statements for XML document:
    Choose two appropriate options
    a) XSD is the XML-based alternative of DTDs having the same purpose of DTDs but more
    powerful and extensible
    b) DTD is the XML-based alternative of XMLs having the same purpose of XMLs but more
    powerful and extensible.
    c) DTD is the older standard. It is most probable that XSD will replace DTD for validating XML
    Documents.
    d) XSD is the older standard. It is most probable that DTD will replace XSD for validating XML
    Documents.
    Answer: a c
  18. Rahul is trying to use StringBuilder class in a program, but he is getting error. To use the
    StringBuilder class which namespace he should include in the program
    Choose most appropriate option
    a) System.String
    b) System.Globalization c) System.io
    d) System.Builder
    e) None of the above
    Answer: e
  19. please select the correct task to prevent possible code injections
    choose three appropriate options
    a) Client side validation need to be done by Java Script
    b) Don’t store sensible data into cookies
    c) Don’t use hidden boxes to hold data
    d) Don’t depend on client side javascript validation
    Answer: b c d
  20. Which of the following statement(s) is/are true about the operator overloading?
    Choose most appropriate option
    a) Binary operators can be overloaded
    b) The cast operator cannot be overloaded, but you can define new conversion operators
    c) Unary operators can be overloaded.
    d) All of the above
    Answer: d
  21. The goal of ____is to decrease the amount of code and maintenance required for data-oriented
    applications
    Choose the appropriate option
    a) LINQ to C#
    b) LINQ to Entities
    c) LINQ to Database
    d) LINQ to XML
    Answer: b
  22. In the .NET Framework, where is the version information of an assembly stored?
    Choose most appropriate option
    a) Manifest
    b) Visual Source Safe
    c) Common type System
    d) Version Control
    Answer: a
  23. Identify drawbacks of the Design Patterns from the below mentioned options
    Choose two appropriate answers
    a) Patterns do not lead to direct code reuse
    b) Patterns are deceptively simple
    c) Teams may not Suffer from pattern overload
    d) Maintainability and reusability
    Answer: a b
  24. This event is raised by the page object. This event is used to complete all tasks that require
    initialization
    Choose the appropriate option
    a) Prelnit
    b) Preload
    c) Init
    d) Initcomplete e) LoadComplete
    Answer: d
  25. A class source-code file that is compiled at run time. These classes can be: HTTP Module,
    HTTP Handler. Can also be a code-behind file for an ASP.NET page or a stand-alone class file
    containing application logic- find the extension of these files above
    Choose most appropriate option
    a) .config
    b) .cs, .jsl, .vb
    c) .licx, .webinfo
    d) .resources, .resx
    Answer: b
  26. which of the following does an assembly contain ?
    Choose most appropriate option
    a) Manifest type metadata, Resources, MSILcode
    b) Manifest, type metadata
    c) Manifest, type metadata, resources
    d) Manifest
    Answer: a
  27. Which Method is used to create a MemoryMappedViewAccessor that maps to a view of the
    memory-mapped file
    Choose most appropriate option
    a) MemoryMappedViewAccesser()
    b) MemoryMappedViewStream()
    c) CreateViewAccessor()
    d) CreateMemoryMappedViewAccessor()
    Answer: c
  28. Which of these namespaces handle the following information Language-Country/ Region Calendars in use Format pattern for dates -Currency
    Choose most appropriate option.
    a) System.String
    b) System.Globalization
    c) System.lO
    d) System.Reflection
    Answer: b
  29. WPF Which control n the WPF application has a property GroupName ?
    Choose most appropriate option
    a) CheckBox
    b) RadioButton
    c) ComboBox
    d) All of the above
    Answer: b
  30. In an interview Akshay was asked to evaluate following code and determine the Output.
    class Program
    {
    static Program()
    { int number= 100; int denominator= intParse(“0”);
    int result = number /denominator; Console writeLine(result); } }
    class MyClass { static void Main() { Program program= new Program(); } }
    According to you, what should be the output of this code? Choose most appropriate option
    a) System.DivideByZeroException
    b) System.TypelnitializationException
    c) System.InvalidCastException
    d) There won’t be any exception, result would get printed.
    Answer: b
  31. Shruthi is working as a developer. She has to write the code to Create a ConnectionString.
    Which of the following parameter of ConnectionString she should use to specify the name of the
    database ?
    Choose two appropriate options.
    a) Provider
    b) Initial Catalog
    c) Database
    d) Data Source
    Answer: b c
  32. Which of the following is/are Statement(s) related to interface ?
    Choose most appropriate option
    a) Interface is a type whose members are all public and abstract by default
    b) Interface itself can inherit other interfaces
    c) To implement an interface, class uses the same syntax that is used for inheritance.
    d) All the above
    Answer: d
  33. True/False: XML serializes only the public properties and private fields of an object.
    Choose most appropriate option
    a) TRUE
    b) FALSE
    Answer: b
  34. Refer to the below code and Identify the missing statements.
    [ServiceContract]
    Public interface IHello
    {
    void SayHello(string name);
    }
    Choose most appropriate option.
    a) [OperationContract] attribute needs to be included about the SayHello method.
    b) [DataMember] attribute needs to be included about the SayHello method.
    c) [ServideContract] attribute needs to be included about the SayHello method.
    d) None of the above.
    Answer: a
  35. To execute the below code successfully, which namespace to be included
    Using System; class MyClass { static void Main(String[] args) { Parallel.For{21, 31, i =>
    {Console.WriteLine(i);}};} }
    choose most appropriate option
    a) System.Threading
    b) System.Threading.Tasks
    c) System.Linq
    d) Using System.Collections.Concurrent
    Answer: b
  36. Consider the following code and identiry the statements which are true?
    using System;
    using System.Linq;
    class OrderDemo {Static void Main(){String[] englishletters={“d”, “c”, “a”, “b”};
    var sorted = from englishletter in englishletters orderby englishletter select englishletter;
    foreach(string value in sorted) { Console.WriteLine(value);}}}
    Choose two appropriate options.
    a) Englishletters is an unsorted array
    b) Sorted is an IEnumerable
    c) The output will be in the descending order
    d) The foreach loop is responsible for sorting the englishletters
    Answer: a,b
  37. Which of the following substantiates the use of stored procedure?
    Choose most appropriate option.
    a) The number of requests between the server and the client is reduced.
    b) The execution plain is stored in the cache after It is executed the first time
    c) .Stored procedures accept parameters.
    d) You can bypass permission checking on stored procedure.
    Answer: b
  38. _______ is the process of converting the state od an object into a form that can
    be persisted or transported.
    Fill in the blank with an appropriate option.
    a) Delegate
    b) Serialization
    c) Events
    d) Object Initalizer
    Answer: b
  39. Samriti needs to create a UML Diagram that can depict the user requirements scenarios in
    which your system or application interacts with people, organizations or external systems.
    Which diagram should she be using?
    Choose most appropriate option
    a) Use Case Diagram
    b) Class Diagram
    c) Object Diagram d) Sequence Diagram
    Answer: a
  40. Rohit wanted to print the SQL server name of his system. Which code should use in SQL
    server name?
    Choose two most appropriate options.
    a) Select @@servername
    b) print@@servername
    c) select@@server
    d) print@@server
    Answer: a,b
  41. In WWF, __ is the interaction between the Host processes and a specific activity
    in an specific workflow instance.
    Choose most appropriate option.
    a) Local Communication
    b) Compensation
    c) Correlation
    d) Serialization
    Answer: c
  42. How the rules or conditions expressed in WWF to implement business logic
    Choose most appropriate option
    a) Conditions can be articulated as declarative, or defined in code
    b) Rules consist a condition statement and collections of actions that are not performed based on
    the result of the condition
    c) Rules are expressed as an XML file
    d) a & c
    e) a & b & c
    Answer: d
  43. Which of the following will legally declare a construct and initialize an array?
    Choose most appropriate option.
    a) char myArray[] = {‘a’, ‘b’, ‘c’};
    b) char myArray[] = {a ; b; c; );
    c) char myArray[] = {‘a’; ‘b’; ‘c’);
    d) char [ ] myArray= {‘a’, ‘b’, ‘c’};
    Answer: d
  44. Web Server provides a detailed description of the extensions, filters, and script mapping
    Choose the appropriate option
    a) Internet Server Active Programming Interface (ISAPI}
    b) Internet Served Application Programming Integration (ISAPI)
    c) Internet Server Application Programming Interoperability (ISAPI)
    d) Internet Server Application Programming Interface (ISAPI) Answer: d
  45. A jagged array is an array of arrays, and therefore its elements are __.
    Fill in the blank with an appropriate option.
    a) Value types
    b) Reference types
    c) Both Value types and Reference types
    Answer: b
  46. Which of the following is true about ADO.NET?
    Choose most appropriate option.
    a) ADO.NET is an object oriented set of libraries that allows you to interact with data sources.
    b) ADO.NET classes are found in System.Data.dll.
    c) ADO.NET classes are integrated with XML classes.
    d) ADO.NET contains .NET Framework data provieder for connecting to a database.
    e) All of the above.
    Answer: e
  47. Identify the statements which are in Camel Case.
    Choose the two appropriate options.
    a) Public void Show(string bookName){…}
    b) totalAmount
    c) BlueColor
    d) Public event EventHandler ClickEvent
    Answer: a,b
  48. Which of the following are facts about Non-persistence memory mapped files?
    Choose most appropriate option
    a) These files are memory-mapped files that are associated with a source file on a disk.
    b) When the last process has finished working with the file, the data is saved to the source file on
    the disk.
    c) These memory-mapped files are suitable for working with extremely large source files.
    d) These files are suitable for creating shared memory for inter-process communications
    Answer: d
  49. LINQ relied on the concepts of extension of extension methods, anonymous types,
    anonymous methods and _____.
    Fill in the blank with an appropriate option.
    a) Lambda expressions
    b) Xml expressions
    c) Data expressions
    d) Sql expressions
    Answer: a
  50. What are the services will be provided by Windows Workflow – Foundation?
    Choose two most appropriate option
    a) Transaction Services b) Migration Services
    c) Scheduling Services
    d) Security services
    Answer: a,c
  51. Are the following statements true or false?
    Statement 1: A Task is a schedulable unit of work. Statement
    2: Task enqueued to a TaskScheduler.
    a) Both statements are true.
    b) Both statements are false.
    c) Statement 1 is false and statement 2 is true.
    d) Statement 2 is false and statement 1 is true.
    Answer: a
  52. Which of the following apply to constructor?
    Choose three appropriate options.
    a) Constructors are methods that set the initial state of an object
    b) Constructors cannot return a value, not even void
    c) Constructors can be inherited
    d) If the class does not explicitly declare a constructor, it will default to a no parameter, do
    nothing constructor
    Answer: a, b, d
  53. What will be the output of the below program using System;
    using System.IO;
    class Program
    { Static void Main(string[] args)
    { StreamWriter sw = File.CreateText(“C:\accenture.txt”);
    try { sw.WriteLine({“Welcome to Accenture”);}
    catch(IOException e){ Console.WriteLine(e.Message);}
    finally{ if(sw != null) sw.Close();}}}
    Choose most appropriate option
    a) Accenture.txt file is created in C: drive
    b) IOException will be thrown
    c) Unhandled Exception
    d) Compiletime Error
    Answer: a
  54. Shruthi is working on the code below. When she executes this code she is facing this error –
    using directive error.
    Which of the option will resolve this error?
    Int[] numbers = new int[7] (0,1,2,3,4,5,6};
    var numQuery = from num in numbers where (num % 2 ) == 0 select num;
    foreach (int num in numQuery) {Console.Write(“{0}”, num);}
    Choose most appropriate option
    a) She must use the System.Linq namespace b) She must use the System.Linq.Expressions namespace
    c) She must revise her LInq query
    d) None of the above
    Answer: a
  55. With respect to generic concept, developers can create which generic item?
    Choose three appropriate options.
    a) Generic constant
    b) Generic class
    c) Generic event
    d) Generic delegate
    Answer: b,c,d
  56. Radha wants to sort data stored in an array. She doesn’t want to work on the sorting
    functionality. Do we have any provision in the .NET framework FCL to help her in sorting?
    Choose most appropriate option
    a) Yes, she can use System.Sory(array)
    b) Yes, she can use System.Data.Sort(array)
    c) Yes, she can use System.Array.Sort(array)
    d) No, she need to write the sort functionality
    Answer: c
  57. Error handling in WCF service is handled by ___.
    Choose most appropriate option.
    a) Fault Contract
    b) ServiceContract
    c) DataContract
    d) MessageContract
    Answer: a
  58. Which of the options is valid with respect to below statements
    Statement1: StringBuilder saves time and memory by not creating a new string each time an
    operation is performed on a string.
    Statement2: System.Math class provides constants and static methods for trigonometric,
    logarithmic, and assertion functions.
    Choose most appropriate option.
    a) Statement1 is True. Statement2 is false
    b) Statement1 is False. Statemetn2 is True
    c) Statement1 is False. Statement2 is False
    d) Statement1 is True. Statement2 is True
    Answer: a
  59. Identify correct syntax for declaring indexer.
    Choose most appropriate option.
    a) public int this[int index] { get{ } set{ } }
    b) public int [int index]this { get{ } set{ } } c) public this[int index] { get{ } set{ } )
    d) public this[int index] int { get{ } set{ } )
    Answer: a
  60. A/An _____ that does not have a WHERE clause produces the Cartesian
    product of the tables involved in the join.
    Choose the appropriate option
    a) Equi Join
    b) Inner Join
    c) Self Join
    d) Cross Join
    Answer: d
  61. Arun wants to retrieve result using a query “select count(*) from employee”. Which is most
    appropriate SqlCommand method for his requirement
    Choose most appropriate option
    a) Execute Reader
    b) ExecuteQuery
    c) ExecuteNonQuery
    d) ExecuteScalar
    Answer: d
  62. CREATE VIEW [dbo].[viewmyTable] AS SELECT D.DeptName, D.Location, E.Name FROM
    Department D LEFT OUTER JOIN Employee E ON D.DeptID = E.DeptID GO
    Predict the output, when the above query executed?
    Choose most appropriate option
    a) Commands execute successfully
    b) Incomplete query
    c) Syntax error
    Answer: a
  63. Which of the following are True for Workspace
    Choose two appropriate options
    a) Workspace is a folder created within the local system which maps a project in the source
    control.s
    b) Files within the source control which needs changes, should be first loaded into the
    workspace of the local system. Any changes made to the files are stored in the local workspace.
    c) Only one workspace can be maintained for a single project in the source control.
    d) Files need to be checked-out in order to upload changes into source control.
    Answer: a,b
  64. Visibility qualifier is used for which off the following?
    Choose most appropriate option.
    a) Specifying different visibility for the get and set accessors of a property or an indexer.
    b) Setting the visibility off the accessor get and set to public even though the property visibility
    is set to protected. c) Setting the visibility of the accessor and set to public even though the property visibility is set
    to internal.
    d) All off the above.
    Answer:a
    63.Select the two correct two statements for xml schema(XSD)
    Choose most appropriate option.
    a) The elements is the root element for XSD.
    b) Has data types and namespaces,like DTDs.
    c) Elements in schemas are divided into three types: Simple Elements Mixed Elements Complex
    Elements.
    d) XSD is written similarly to xml as xsd makes use of xml syntax, hence most of the rules to xml
    apply to xsd.
    Answer:a,d
  65. State true or false for the statements for design patterns.
    Statement 1: Prototype-A fully initialized instance to be copied or cloned.
    Statement 2: Singleton-A class of which only a multiple instances can exist.
    Choose most appropriate option.
    a) All the statements are true.
    b) All the statements are false.
    c) Statement1 is true and statement2 is false.
    d) Statement2 is true and statement1 is false.
    Answer: c
    65.What is the .NET Collection class that allows an element to be accessed using a unique key?
    Choose most appropriate option.
    a) Arraylist
    b) StringCollection
    c) Stack
    d) Hashtable
    Answer: d
  66. Rajesh needs to copy only specific range of elements from MyArray to copyMyArray. He is
    using Follwing code.
    Int[] myarray= new int[3] {20,19,21};
    Int[] copyarray= new int[3];
    Array.Copy(myarray,copyarray,1);
    Would this code give him desirable Output?
    Choose most appropriate option.
    a)Yes
    b)No
    Answer:a
  67. Consider the following statements and identify the WCF program 1,These are programs that
    consume the services 2.They are normally the ones the initiate the messaging to the service.
    Choose most appropriate option.
    a) Message
    b) Client c) Intermediates
    d) None of the option
    Answer:b
    68.Which of the bbelow syntax is correct to define operator method or to perform operator
    overloading?
    Choose most appropriate option.
    a) Public static op(arglist) {}
    b) Public static returnvalue op(arglist){}
    c) Public static returnvalue operator op(arglist){}
    d) All of the above
    Answer:c
  68. Identify two conditions from the following that need to be met for multicast delegates.
    Choose most appropriate option.
    a)None off the parameters of the delegate is an output parameter.
    b)The return type of the delegate is void.
    c)The parameter o the delegate is an output parameter
    Answer:a,b
  69. What is /are the different component(s) off LINQ?
    Choose most appropriate option.
    a) LINQ to Objects
    b) LINQ to XML
    c) LINQ to SQL
    d) LINQ to Entity
    e) All of the above
    Answer: e
    71.Identify the description of @@IDENTITY.
    Choose most appropriate option.
    a) Returns the error number for the last Transact-SQL statement executed.
    b) Returns the last –inserted identity value.
    c)Returns the number of rows affected by the last Statement.
    Answer:b
    72.Identify the list off Common Exception Classes
    Choose most appropriate option.
    a) System.StackException
    b) Syystem.NullReferenceException
    c) System.ArrayTypeMismatchException
    d) System.TypeMisMatchException
    e) System.InvvalidCastException
    Answer:b,c,e
  70. Read the statement below and identify the workflow component This is the act of undoing
    any actions that were performed by a successfully completed activity because of an exception
    that occurred elsewhere in a workflow
    Choose most appropriate option.
    a) Activity
    b) Compensation
    c) Service d) Workflow persistence
    Answer:b
  71. John is developing an application for ABC company in which he wants to combine
    application UIs,2D graphics,3D graphics, documents and multimedia is one single framework.
    Which component can he use?
    Choose most appropriate option.
    a)WPF
    b)WCF
    c)Linq
    d)OOPS
    Answer: a
    75.What is/are the advantages of LINQ over stored procedures?
    Choose most appropriate option.
    a)Debugging- it is really very hard to debug the stored procedure but as LINQ is part off .NET,
    you can use visual studio’s debugger to debug the queries.
    b)Deployment- With stored procedures, we need to provide an additional script for stored
    procedures but with LINQ everything gets compiled into single DLL hence deployment
    becames easy.
    c)Type Safety- LINQ is type safe, so queries errors are type checked at compile time.it is really
    good to encounter an error when compiling rather than runtime exception
    d)All off the above
    Answer: d
  72. which of the below are valid Statements about DataReader and Data set
    Choose most appropriate option.
    a) DataReader reads all the the records at a time and it is used in multiple databbbases.
    b) DataSet always reads one record at a time and it moves into a forword direction.
    c) DataReader is a connected Architecture
    d) Dataset is a collection of in memory tables
    Answer:c,d
  73. Identiffy the functions of common type System(CTS)
    Choose most appropriate option.
    a) They form the fundamental unit off deployment, version control, reuse, activation scoping, and
    security permissions
    b) Most off the members defined by types in the .NET framework class Library are CLS-compliant
    c) Establishes a framework that helps enable cross-Language integration, type safety, and high
    performance code execution
    d) Provides an object –oriented model that supports the complete of many programming
    languages
    Answer:c,d
  74. Identify the tasks a user is able to perform in Source Control Explorer
    Choose most appropriate option.
    a) Create/Rename/Delete files and folders
    b) Check in/out files
    c) Get latest/Specific version
    d) All of the above Answer:d
    79.__ Represents the standard input, output, and error streams ffor console
    applications. This class cannot be inherited.
    Fill the blank with appropriate option.
    a) Console class
    b) TextWriter class
    c) Text class
    Answer:a
    80.What is the namespace for “Task” class?
    Choose most appropriate option.
    a) System.Tasks
    b) System.Threading.Tasks
    C) System.Diagnostiscs.Tasks
    d) System.Dynamic.Task
    Answer:b
    81.State true or false for the below statements.
    Statement1 : Multicast delegates are used extensively in event handling.
    Statement2 : Delegation can be used to define callback methods
    Choose most appropriate option.
    a) Statement1 and Statement2 are true
    b) Statement2 is true and Statement2 is false
    c) Statement1 is true and Statement2 is false
    d) Statement2 and Statement1 are False
    Answer:a
    82.________________namespace provides classes for using a memory mapped ile,which maps
    the contents of a file to an applications logical address space.
    Fill with the most appropriate option.
    a)System.MemoryMappedFile
    b)System.MemoryMappedFiles
    c)System.IO.MemoryMappedFiles
    d)System.IO.Memory
    Answer:c
    83.Identify the WCF contract considering the following statement
  75. WCF contracts defines implicit contracts for built in data types like string and int.
  76. This contract defines which data types are passed to and from the service
    Choose most appropriate option.
    a) Service Contract
    b) Fault contact
    C) Data Contract
    d) Message contact
    Answer:c
  77. Which of the below statements are correct about Indexers
    Choose most appropriate option.
    a) Indexers are location indicators
    b) Indexers are used to access class objects
    c) Indexer is a form of property and works in same way as a property
    d) a&b e) b&c
    f) a,b&c
    Answer:f
    85._________and __________ methods of a delegate helps to process delegate
    asynchronously
    Fill the blank with appropriate option.
    a) BeginInvoke(),EndInvoke()
    b) InvokeBegin(),InvokeEnd()
    c) Begin(),End9)
    d) BeginInvokeDelegate(),EndInvokeDelegate()
    Answer:a
    86.Which option gets the version of the selected file/folder specific to date, changeset, label,or
    workspace version?
    Choose most appropriate option.
    a)GetSpecificFile
    b)GetLatestVersion
    c)GetSelectVersion
    d)GetSpecificVersion
    Answer:d
    87.All query operations of LINQ consist of three district actions
    Choose most appropriate option.
    a) 1. Obtain the data source 2. Declare the Data source 3.Excute the data source
    b) 1. Declare the data source 2.Initialize the query 3. Execute the query
    c) 1. Declare the Data source 2. Create the data source 3 .Execute the Data source
    d) 1. Obtain the data source 2.Create the query 3. Execute the query
    Answer:d
    88.Rajesh is implementing an ASP.NET page. The page include a method named
    GetProjectAllocation that returns dataset. The Dataset includes a datatable named
    ProjectAllocation. Rajesh need to show the data in GridView control named GridView1
    Choose most appropriate option.
    a)Gridview1.DataTable=GetProjectAllocation();
    b)GridView1.DataTable=GetProjectAllocation();GridView1.DataBind();
    c) GridView1.DataSource=GetProjectAllocation();GridView1.DataBind();
    d) GridView1.DataSourceId=GetProjectAllocation();GridView1.DataBind();
    Answer:c
    89._____________is a pre defined, reusable routine that is stored in adatabase
    Fill the blank with most appropriate option.
    a) Function
    b) Stored Proccedure
    c) View
    d) Joins
    Answer:b
    90.Which of the following are True for Workspace
    Choose two appropriate options
    a) Workspace is a folder created within the local system which maps a project in the source
    control.s b) Files within the source control which needs changes, should be first loaded into the
    workspace of the local system. Any changes made to the files are stored in the local workspace.
    c) Only one workspace can be maintained for a single project in the source control.
    d) Files need to be checked-out in order to upload changes into source control.
    Answer: a,b
  78. In LINQ , all the core types are defined in _
    Choose most appropriate option.
    a) System.Linq.XML and System.Linq.Expressions
    b) System.Linq and System.Linq.XML
    c) System.Linq and System.Linq.Expresssions
    d) System.XML.Linq and System.Linq.Expressions
    Answer : C
  79. The _ hosting option is integrated with ASP.NET and uses the features these technologies
    offer, such as process recycling , idle shutdown ,process health monitoring , and message based
    activation.
    Choose most appropriate option
    a) IIS
    b) Windows Services
    c) WAS
    d) Self Hosting
    e) All of the above
    f) None of the above
    Answer : A
  80. What are true about Static Constructors
    Choose two appropriate options
    a) Static variable get instantiated after the static constructor
    b) Static constructors provide the flexibility of statically initializing static variables
    c) Static constructors have access to static members of theirs class only
    d) A static constructors does not have parameters and access modifiers cannot be applied to it
    Answer : C, D
  81. Which of the below statement(s) are valid in Operator Overloading?
    Choose most appropriate option
    a) The conditional logical operators cannot be overloaded
    b) The array indexing operator can be overloaded
    c) The comparison operators cannot be overloaded
    d) All of the above
    e) None of the above
    Answer : A
  82. You want to make a configuration setting change that will affect only the current web
    application. Which file will you change?
    Choose most appropriate option
    a) Web.config b) Machine.config
    c) Global.asax
    Answer : A
  83. Testing which attribute should be used to run code before the first testis run in the class?
    Choose most appropriate option
    a) TestInitialze()
    b) TestClass()
    c) ClassInitialize()
    d) TestStart()
    Answer : C
  84. VSTS is also used for automated unit testing of components and regression testing.
    State TRUE or FALSE
    a) FALSE
    b) TRUE
    Answer : TRUE
  85. Which access modifier cannot be used with data members of a structure?
    Choose most appropriate option
    a) Public
    b) Protected
    c) Internal
    d) Private
    Answer : B
  86. Anand has created a master page named Plant.master. the master page uses the following page
    directives.
    <%@ Master Language=”c#” Src=”~/Plant.master.cs” inherits=”Plant” %>
    He needs to create a content page that uses the master page as a template. In addition , he
    needs to use a single master page for all devices that access the web site. Which code segment
    should be use ?
    Choose most appropriate option
    a) <%@ Page Language=”c#” Theme=”Plant” Skin=”Plant.cs”%>
    b) <%@ Page Language=”c#” MasterPageFile=”~/Plant.master” %>
    c) <%@ Page Language=”c#” device:MasterPageFile=”~/Plant.master” %>
    d) <%@ Page Language=”c#” de:MasterPageFile=”~/Plant.master” %>
    Answer : B
    100.
    CREATE VIEW [dbo].[viewmyTable] AS SELECT D.DeptName , D.Location , E.Name FROM
    Department D JOIN Employee E ON D.DeptID = E.DeptID GO Predict the output , when the
    above view is executed ?
    Choose most appropriate option
    a) A view will be created by selecting deptname , location from the department table and
    employees name from the employee table .
    b) Syntax error c) Incomplete query
    d) A view will be created by selecting deptname , location and name from the department
    table.
    Answer : A
    101.
    Are the methods below a valid overload
    Public int Sum(ref int a , ref int b)
    Public int Sum(out int a , out int b)
    Choose most appropriate option
    a) Yes
    b) No
    Answer : No
    102.
    State true or false for the below statements.
    Statements1. Extension Methods: Which gives us the capabilities to asses our own custom
    methods to data types without deriving from the base class.
    Statement2. Object Initializer: allows you to pass in named values for each of the public
    properties that will be used to initialize the object.
    Choose most appropriate option
    a) Statement 1 and statement 2 are true.
    b) Statement 1 and statement 2 are false.
    c) Statement 1 is false and statement 2 is true.
    d) Statement 2 is false and statement 1 is true.
    Answer : A
    103.
    True/False : Fault Handling is a method of the workflow runtime engine that
    synchronously handles the exceptions that occur in the activities
    Choose most appropriate option
    a) TRUE
    b) FALSE
    Answer : FALSE
    104.
    Which of the following are true about Delegates?
    Choose three appropriate options
    a) A delegate can reference a method only if the signature of the method exactly matches the
    signature specified by the delegate type
    b) A delegate allows the programmer to encapsulate a reference to a method insidea delegate
    object
    c) Delegate are similar to function pointers
    d) Generally useful way for objects to signal state changes that may be useful to clients of that
    object. Answer : A ,B ,C
    105.
    Amulya has created following class:
    Public class Employee { public int EmployeeCode{ get; set;} public string EmployeeName{get;
    set;} public int EmployeeAge{get; set;}}
    Please select correct code for initializing an object by using Object initializers.
    Choose most appropriate option
    a) Employee emp = new Employee(EmployeeCode=111;
    EmployeeName=”Raghav” ;EmployeeAge=26;};
    b) Employee emp = new Employee{EmployeeCode=111,
    EmployeeName=”Raghav”,EmployeeAge=26};
    c) Employee emp = new Employee(){EmployeeCode=111;
    EmployeeName=”Raghav”;EmployeeAge=26;};
    d) Employee emp = new Employee(){EmployeeCode=111,
    EmployeeName=”Raghav”,EmployeeAge=26};
    Answers : B
    106.
    Identify which statements are false about windows Presentation foundation(WPF)
    Choose two appropriate options
    a) Used for standalone and browser hosted applications
    b) Uses XAML markup to implement the appearance of an application
    c) The service-oriented design results in distributed systems that runs between services and
    clients
    d) Provides a programming model for building workflow-based applications in windows
    Answer: C , D
    107.
    How do you specify a constraints for the type to be used in a generic class
    Choose most appropriate option
    a) Class Program where T: MyInterface
    b) Class Program : MyInterface
    c) Class Program constraint T : MyInterface
    d) Class Program where T : MyInterface
    Answer: A
    108.
    VIEW [dbo].[viewmyTable] AS SELECT D.Deptname,D.location ,E.Name FROM
    Department D FULL OUTER JOIN Employee E ON D.DeptID = E.DeptID
    Whats the output , when the above query is executed?
    Choose most appropriate option
    a) Display all the employees with their Departments .Output contains
    b) The employee names and all the department names present in the database
    c) Syntax error
    d) Incomplete Query
    Answer : A
    109.
    Which is the top .NET class from which everything is derived?
    Choose most appropriate option a)
    b)
    c)
    d)

System.Collections
System.Globalization
System.Object
System.IO

Answer : C
110.
From the following option choose the features of WPF
Choose three appropriate options
a) Rich Composition
b) Seperation of appearance and behavior
c) Resolution dependence
d) Highly customizable
Answer : A , B ,D
111.
WCF host can be IIS or WebService or Console Application
Choose most appropriate option
a) TRUE
b) FALSE
Answer : TRUE
112.
Sam is developing an application in which he wants to use child controls are positioned
by rows and columns . which layout he can use ?
Choose most appropriate option
a) Grid
b) Canvas
c) Dock panel
d) Stack panel
Answer : A
113.
Identify the code snippet for creating custom exception class
Choose most appropriate option
a) Class CustomException:ApplicationException{}
b) Class CustomException : AppException{}
c) Class ApplicationException : CustomException{}
d) None of the above
Answer : A
114.
Which of the following is true about overloading?
Choose most appropriate option
a) Overloaded methods must change the argument list.
b) Overloaded methods can change the return type.
c) Overloaded methods can change the access modifier.
d) All of the above.
Answer : D

1)DOT Net collection class allows element to be accessed using a unique key.

Ans:-Hash Table
2)Major use of go keyword.
3)Which of the following represents not equals,

Ans:-<>
4)Significant advantages of rules over check.
5)State true/false: for loops are available for writing SQL server batches.

-False
Foreach is used
6)Which of the foll. is not a JIT compiler

Ans:-Extensive JIT
7)Which of the foll. is used to read & write encoded strings & primitive data types from and to
streams

Ans:-Binary Reader & Binary Writer
8) What are delegate inferences used for? (Select the best option)
a. Used to declare a delegate object
b. Used to wrap a method to a delegate object
c. Used to make a direct assignment of a method name to a delegate variable
without wrapping it first with a delegate object
d. A and C
e. All of the above

9)All elements of an interface should be __ by default.

Ans:-Public
10)State true or false: User defined fns. can return a table.

Ans:-True
For Eg: DataSets are returned.

11)At one time by using ALTER TABLE how many columns are affected

Ans:-1
12)Multiple Methods address can be conctenated to delegate using operator:

Ans:- +
13)Purpose of Assert Methods of N Unit:-

Ans:- To determine correctness of expected results.
14)Class that encapsulates event infmn. should be derived from

Ans:-System .Event.Args
15)In ADO.net to manage data in dissconnected mode

Ans:-SQL Data Adapter
16)Which SQL data types should be used to hold unicode char?

Ans:- I think it is NCHAR-not sure
17)2 fundamental objects in ADO.Net?

ANS:SQLConnection
SQLCommand
18)Preprocessor directive is used to mark the contained block of code is to be treated as single
block & and can be expanded & collapsed

Ans:-# region and #end region
19)Use case Diagrams represents:

Ans:-All of the Above
20) ————- are useful when callback fns. are required.

Ans: Delegates
21)VS.NET defines listbar control in ———————-namespace.

Ans: vbAccelerator.Control.ListBar
22)Question related to NUnit

Ans:-Unit Testing & Regression Testing
23)Questions related to Stored Procedure.

Ans:-Command Type Property
24)Logical group of similar classes related based on functionality is called as _

Ans:- Namespace
25)Which database recovery model has greatest possibility of data loss & is suited mostly for
database that change in frequently.

Ans:-Full Recovery
26)Operator to perform wildcard searches for valid search string value.

Ans:-Like

Knowledge Check 1 – Solution

  1. What is the function of CLR? (Select the best option)
    a. Compilation of MSIL code into native executable code
    b. Playing a central role in making C# robust
    c. Defining the .NET platform
    d. None of the above
    :
    a. Correct. CLR is a runtime environment in which programs written in C# and other .Net
    languages are executed. It is the job of the CLR to compile the MSIL code to native
    executable code.
  2. Which of the following are key benefits of C#? (Select the best option)
    a. It is object-oriented
    b. It is type-safe
    c. It is multi-threaded
    d. It is secure
    e. All of the above
    e. Correct. This is the best answer because they all are key benefits of C#.
  3. Which of the following is a C# comment indicator? (Select the best option)
    a. /*
    b. \
    c. /* */
    d. All of the above:
    c. Correct. There are two types of C# comments, namely: single line-doc comments and
    delimited-doc (multi-line) comments. This is the indicator for a multi-line comment.
  4. Which of the following statements are true? (Select the best option)
    a. It is possible to perform check-in and check-out operations directly through Visual
    Studio 2005
    b. We can get the current version of our source code file from Visual SourceSafe
    c. Use Undo Checkout option to rollback your changes
    d. All of the above
    e. None of the above
    d. Correct. All true statements, so this option is the best choice.
  5. What is a using directive used for? (Select the best option) a. Creating an object
    b. Organizing a collection of classes
    c. Referencing namespaces
    d. All of the above
    c. Correct. Using directive imports the names of other namespaces, allowing them to be
    referenced directly instead of through qualified names.
    1 class Test
    2 {
    3
    void MethodOne( )
    4
    {
    5
    int x = 10;
    6
    MethodTwo (x);
    7
    System.Console.WriteLine(“MethodOne “+ x);
    8
    x = 20;
    9
    System.Console.WriteLine(“MethodOne “+ x);
    10
    }
    11 void MethodTwo (int x)
    12 {
    13
    System.Console.WriteLine(“MethodTwo “+ x);
    14
    x = 50;
    15
    System.Console.WriteLine(“MethodTwo “+ x);
    16 }
    17
    public static void Main(string[] args)
    18
    {
    19
    Test b = new Test();
    20
    b.MethodOne();
    21
    }
    22 }
    6 Which of the following output is correct when the C# program in the graphic is
    executed? (Select the best option)
    a. At line 7 – MethodOne 10
    b. At line 9 – MethodOne 20
    c. At line 13 – MethodTwo 10
    d. At line 15 – MethodTwo 50
    e. All of the above
    e. Correct. All display the correct output.
    Explanation for faculty:
    C has the correct output because when MethodOne() is called in the main method, it
    initializes the value of x to 10. MethodOne() then calls MethodTwo (), passing the value of x
    which is 10, hence at line 13, it prints “MethodTwo 10”. D has the correct output because inside MethodTwo () (having a copy of x), x is reinitialized
    to 50, hence printing at line 15, “MethodTwo 50”.
    A and B have the correct output because after the final statement in MethodTwo () is
    executed, it goes back to the calling method, which is MethodOne(), printing at line 7,
    “MethodOne 10” and at line 9, “MethodOne 20” following the concept of passing by value.
    1 public class Test
    2
    {
    3
    static void MethodOne(Holder holds)
    4
    {
    5
    System.Console.WriteLine(“MethodOne “+ holds.X);
    6
    MethodTwo(holds);
    7
    System.Console.WriteLine(“MethodOne “+ holds.X);
    8
    }
    9
    static void MethodTwo(Holder holds)
    10
    {
    11
    System.Console.WriteLine(“MethodTwo “+ holds.X);
    12
    holds.X = 50;
    13
    System.Console.WriteLine(“MethodTwo “+ holds.X);
    14
    }
    15
    16
    public static void Main (string[] args)
    17
    {
    18
    Holder holds = new Holder();
    19
    MethodOne(holds);
    20
    }
    21 }
    22
    public class Holder
    23
    {
    24
    private int x = 10;
    25
    public int X
    26
    {
    27
    get
    28
    {
    29
    return x;
    30
    }
    31
    set
    32
    {
    33
    x = value;
    34
    }
    35
    }
    36
    }
    7 Which of the following output is correct when the C# program in the graphic is
    executed? (Select the best option)
    a. At line 5 – MethodOne 5 b. At line 7 – MethodOne 10
    c. At line 11 – MethodTwo 50
    d. At line 13 – MethodTwo 50
    e. All of the above
    d. Correct. The output is correct; it should be MethodTwo 50.
    . Explanation for Faculty
    D is the best answer because the output is incorrect – at line 13, MethodTwo should be 50.
    A contains incorrect output because when MethodOne() is called in the main method,
    passing an instance of Holder class, at line 5 it prints “MethodOne 10”.
    C contains the incorrect output because MethodOne() calls MethodTwo (), passing the same
    reference variable. So, at line 11 it prints “MethodTwo 10”.
    D contains the correct output because by changing the value of x using the set accessor to
    50, at line 13 it prints “MethodTwo 50” and at line 7, “MethodOne 50”.
    8 Which of the following is true about handling exceptions? (Select the best option)
    a. The procedure for handling exceptions involves the try…, catch() …, and finally
    statements.
    b. If there are several different exceptions that might be thrown, it is possible to have
    multiple catch() statements to handle them.
    c. In C# it is not possible to throw exceptions programmatically using the “throws”
    keyword.
    d. If an exception is handled in a catch block, then the finally block will be executed.
    e. All of the above
    e. Correct. All are true about handling exceptions.
    9 Which of the following are valid declarations of a string? (Select the best option)
    a. string s1 = “strings rule”;
    b. string s2 = (string) ‘strings rule’;
    c. string s3 = ‘strings rule’;
    d. All of the above
    e. None of the above
    a. Correct. This newly created string is allocated in the so-called string pool, a portion of the
    memory allocated by the CLR. Another way to declare a string is instantiating it through the
    string constructor.
    Explanation for Faculty:
    A is correct. This newly created string is allocated in the so-called string pool, a portion of the
    memory allocated by the CLR. Another way to declare a string is instantiating it through the
    string constructor.
    B is incorrect. A character literal cannot be cast to a string object. C is incorrect. Only one character can be placed inside single quotation marks.
    10 Which of the following will legally declare a construct and initialize an array? (Select
    the best option)
    a. char myList[] = [‘a’, ‘b’, ‘c’];
    b. char myList[] = {a ; b; c; };
    c. char [ ] myList = {‘a’, ‘b’, ‘c’};
    d. char myList [] = {‘a’; ‘b’; ‘c’};
    C Correct. Note that the square bracket to declare an array may be placed before or after
    the reference variable declaration. In C#, it is compulsory to place it before the reference
    variable name and after the data type.
    Explanation for Faculty:

A is incorrect because it uses square brackets instead of curly braces.
B and D are incorrect because elements (a, b and c) inside the curly braces are separated by
a semicolon instead of commas.
C is correct. Note that in C#, it is compulsory to place square brackets before the reference
variable name and after the data type.
11 Which of the following statements is true? (Select the best option)
a. The call stack is the chain of methods that your program executes to get to the
current method.
b. It is possible to recover from some types of errors.
c. At least one catch( ) block or finally block must appear in the try statement.
d. A try …catch block in C# sharp can have multiple catch blocks.
e. All of the above
e. Correct. All are true statements.
12 Which of the following is a keyword in the C# programming language? (Select the best
option)
a. goto
b. Local
c. Inner
d. Branch
e. reference
a. Correct. goto is a keyword in the C# language
13 Given the code shown in the graphic, what is the result at line 5? (Select the best
option)
1 string g1 = “1”;
2 string g2 = “2”;
3 string g3 = “”;

4 g3 = g1 + g2;
5 System.Console.WriteLine(g3);
a. 21
b. 3
c. 12
d. None of the above
c. Correct. In line 1, g1 refers to a String object with “1” in it, and at line 2, g2 refers to a String
object with “2” in it. Line 4 concatenates the two strings together, producing a variable named
g3 consisting of the characters 1 and 2 side by side, or 12.
14 Which of the following is a legal array declaration in C#? (Select the best option)
a. double [] myVariable;
b. string [] names;
c. float [] myNumb;
d. int [] myScores ;
e. All of the above
e. Correct. All offer legal array declarations, following the format of data type [Indexing
operator] identifier name. To declare an array, you must not initialize the number of
elements it will contain.
15 Which of the following is true when the initial value of x is 5? (Select the best option)
a. If y = x++ then y=6
b. If y = ++x then x=5
c. If y = –x then y = 5
d. If y = –x then x=4
e. None of the above
d. Correct. This statement is true. This is a pre-decrement. One unit is subtracted from x
before being passed to y, so the final value of y is 4.

Knowledge Check 2 – Solution
2) What happens during OOP?
a. Programs are based on the concept of procedure call
b. Objects communicate and interact with each other using messages
c. Programs are organized in a fashion similar to how we organize things in our every
day lives
d. None of the Above
B) Correct. Object-oriented programming involves objects that send and receive messages to
invoke actions.
3) Match the concepts in the list on the right with their correct descriptions.
C

1) The ability to hide the internal
implementation details of an object from its

a) Object

external view.
B

2) The ability to create new classes based on
existing classes.

b) Inheritance

D

3) An object’s ability behaves differently
depending on its type.

c) Encapsulation

A

4) A self contained entity with attributes and
behavior.

d) Polymorphism

1) Encapsulation makes the implementation of an algorithm hidden from its client.
2) Inheritance allows you to create a class that inherits the state and behaviors of its
baseclass, thus creating new classes based on existing classes in the hierarchy.
3) Polymorphism is generally the ability to appear in many forms. In object-oriented
programming, more specifically, it is the ability to redefine methods for derived classes.
4) An object is a self-contained entity with attributes and behaviors.
4) Which of the following is true about a constructor? (Select the best option)
a. A constructor is a method that is invoked automatically when a new instance
of a class is created.
b. Constructors do not initialize the variables of the newly created object.
c. Constructors are used to remove objects from memory.
d. The constructor method should have a different name than the class name.
e. None of the above
A) Correct. A constructor method is invoked automatically when a new instance of a class is created.

5) Which of the following is true about overloading? (Select the best option)
a. Overloaded methods must change the argument list
b. Overloaded methods can change the return type
c. Overloaded methods can change the access modifier
d. All of the above
D) Correct. All of the statements are true about overloading.
Explanation for Faculty:
A is a true statement. Method signature is defined by the method name and argument list.
Overloaded methods are unique methods with the same name; therefore, the argument list must
change.
B and C are also true statements because overloaded methods do not really care about the return
type and access modifiers. They may or may not change their return types and modifiers.

6) Which of the following is true about overriding? (Select the best option)

a. Overridden methods must exactly match the argument list
b. Overridden methods must exactly match the return type
c. The access level of overridden methods cannot be more restrictive
d. You cannot override a method marked sealed
e. All of the above
E) Correct. All of the statements are true. The access level of overriding methods should be less
restrictive. A private declaration can be overridden to be protected and public, but a public declaration
could only be overridden by a public modifier alone.
Explanation for Faculty:
A and B are true statements because overriding methods must have exactly the same method name,
argument lists and return types.
D is a true statement because sealed methods cannot be overridden. Note the implication of ‘sealed’
keyword, sealed classes cannot be extended or inherited.

6) Which of the following is true about the parent-child assignment in inheritance? (Select
the best option)
a. child ≠ parent;
b. parent = child;
c. parent = (child) child;
d. child = (child) parent;
e. All of the above
E) Correct. All of the statements are true.
Explanation for Faculty:
A is a true statement. Child = parent is casting down the inheritance hierarchy, which is forbidden in
C#. This results in a compiler error.
B is a true statement because Child inherits from Parent so Child is implicitly casted to type Parent.
C is a true statement. Although implicitly casted as in B, it could also be explicitly casted this way.
D is a true statement. Parent was forced to be casted to type Child. This will compile legally but at
runtime, this statement will yield InvalidCastException.

7) Which of the following is true about polymorphism? (Select the best option)
a. Polymorphism refers to an object’s ability to behave similarly regardless of its type.
b. Overloading is the process of reusing a method name but attached to a different
signature in the same class.
c. Overriding is the process of reusing a method name but attached to a different signature in
the subclass class.
d. All of the above
e. None of the above
B) Correct. This statement is true about polymorphism.

8) Which of the following is a true statement? (Select the best option)

a. The relationship between a class and its base class is an example of a “has-a”
relationship.
b. The relationship between a class and its base class is an example of an “is-a”
relationship.
c. The relationship between a class and an object referenced by a field within the class
is an example of a “is-a” relationship.
d. None of the above
B) Correct. A subclass and its base class share an “is a” type of relationship.

9) Which of the following statements is true? (Select the best option)
a. A constructor can invoke another constructor of the same class
b. A constructor cannot invoke itself
c. A constructor can invoke the constructor of the direct base class
d. All of the above
e. None of the above
D) Correct. All of the statements are true. A constructor can only be invoked by another constructor.
Explanation for Faculty:
A is a true statement. Constructors can be overloaded but not overridden. To invoke another
constructor of the same class, the keyword ‘this()’ is used.
C is a true statement. A constructor can invoke the constructor of the direct base class using “base()”.

10) Which of the following statements is true? (Select the best option)
a. Constructors are not inherited
b. Constructors can be overloaded
c. Constructors must not have a return type
d. The constructor name must match the name of the class
e. All of the above
E) Correct. All of the statements are true statements.

11) Which class is inherited by all other classes? (Select the best option)
a. Object
b. Exception
c. System
d. Threading
A) Correct. The parent class of all classes in C# is the Class Object.
12) Given the following code, which of the following output is correct? (Select the best option)
1
2
3
4

class ClassA
{
public ClassA()
{

5
System.Console.Write(“ClassA “);
6
}
7 }
8
class ClassB : ClassA
9
{
10
public ClassB()
11
{
12
System.Console.Write(“ClassB”);
13
}
14
public static void Main(string[ ]args)
15
{
16
ClassA objB = new ClassB();
17
}

18

}

a. ClassA
b. ClassA
ClassB
c. ClassB
d. None of the above
A) Correct. By instantiating an object of type ClassB, the main method of ClassB invokes its
constructor, in which there is an implicit call to base class, thus calling the constructor of ClassA
printing “ClassA”. Then, it goes back to the calling constructor in the subclass printing “ClassB”.

Knowledge Check 3a – Solution
7) What is the .NET collection class that allows an element to be accessed using a unique key?
a. ArrayList
b. HashTable
c. StringCollection
d. None of the above
Correct. HashTable is the collection class in which the elements can be accessed using a unique
key.
Explanation for Faculty:
A is incorrect. ArrayList does not use unique key to access its elements. B is the correct answer.
HashTable is the collection class in which the elements can be accessed using a unique key.C is
incorrect. StringCollection does not use a unique key. One way of accessing elements in a
StringCollection is by the use of the IEnumerator.
8) What is the top .NET class that everything is derived from?
a. System.Collections
b. System.Globalization
c. System.Object
d. System.IO
C) Correct. System.Object is the class everything is derived from in .NET.

9) Which of the following commands is suitable to use when manipulating large amounts of
string? e.g. append / insert / delete (Select the best option)
a. System.String
b. Char Array
c. Struct
d. StringBuilder
e. All of the above
D) Correct. StringBuilder is best suited for this purpose as it does not create a new string everytime
the value of the string is modified.

10) What namespace contains classes that can be used to define culture-related information?
a. System.Globalization
b. System.Localization
c. A custom namespace with custom functions written to handle localization
d. None as it is available by default.
A) Correct. System.Globalization class contains the required methods and/or properties necessary to
create a localized application.

11) Which of the following should be inherited from when writing Custom Collections? (Select
the best option)
a. ICollection
b. CollectionBase
c. Both A and B
d. Write your own base class and inherit from it.
B) Correct. All custom collection classes should inherit from CollectionBase.
12) Under what permissions do delegates run?
a. Caller’s permission
b. Declarer’s permission
c. It uses the most strict permission available
d. Runs under the least strict permission available
e. It does not require any permission to run.
Correct. Delegates always runs under the caller’s permission.
13) Which of the following statements is/are true?
a. XML serialization serializes only the public fields and property values of an object
b. XML serialization results in strongly-typed classes with public properties and fields that are
converted to a serial format for storage or transport.
c. XML serialization converts all methods, private fields, or read-only properties (irrespective
of their access modifier)
d. Only A & B
e. None of the above

A) Correct. XML Serialization can be used to serialize only the public fields and properties. To
serialize all an object’s fields and properties, both public and private, use the BinaryFormatter
instead of XML serialization. Also, XML Serialization does not include any type information.
14) The class that encapsulates the event information should be derived from:
a. System.EventArgs
b. System.EventHandler
c. System.Delegate
d. System.ComponentModel.EventDescriptor
e. None of the above
Correct. The class that encapsulates the event information should be derived from EventArgs.
15) Which of the following statements is/are true?
a. A delegate can reference a method only if the signature of the method exactly
matches the signature specified by the delegate type.
b. A delegate can reference a method as long as the return type matches the return type
specified by the delegate type. There is no need for the parameters to match.
c. A delegate can reference a method as long as the parameters and their data types match
those specified by the delegate type. There is no need for the return type to be the same
d. Both B and C are true.
e. All of the above are true
A) Correct. A delegate can reference a method only if the signature of the method exactly matches
the signature specified by the delegate type.
16) Which of the following classes are used to read and write encoded strings and primitive datatypes
from and to streams
a. StreamReader and StreamWriter
b. BinaryReader and BinaryWriter
c. StringReader and StringWriter
d. TextReader and TextWriter
Correct. BinaryReader and BinaryWriter are used to read and write encoded strings and primitive
datatypes from and to streams.
17) Generic types can be used (Select the best option)
a. To maximize code reuse, type safety and performance.
b. To create collection classes
c. To create your own generic interfaces, classes, methods, events and delegates
d. All of the Above

D) Correct Generic types maximize the code reuse, are type safe and improve performance;
they are used to create collection classes. We can also use them to create our own generic
interfaces, classes, methods, events and delegates.
18) Which of the following regarding iterators is true? (Select the best option)
a. They are a method, get accessor or operator that supports foreach iteration in a class or
struct
b. They are used in collection classes
c. Using an iterator allows us to traverse a data structure without having to implement the
IEnumerable interface.
d. A and C
e. All of the above

E) Correct. All of the above are correct. Iterator is a method, get accessor or operator that
supports foreach iteration in a class or struct. It is useful with collection classes. Iterator
allows traversing a data structure without having to implement the IEnumerable interface.
19) Which of the following about partial types is true? (Select the best option)
a. Allows us to split the definition and implementation of a method in a class across multiple
files
b. Allows us to split the definition and implementation of a class across multiple files
c. Allows us to split the method definition in one file and implementation in another file
d. All of the above

B) Correct. Partial type allows you to split the definition and implementation of a class across
multiple files.
20) Which of the following is true concerning a static class?
a. A static class allows adding non-static members
b. One can create instances of the static class
c. The keyword ‘static’ is used, when defining a static class
d. One can create a derived class from a static class
e. All of the above

C) Correct. Keyword static is used when defining a static class.
ExplanationA static class does not allow adding of non static members. We cannot create
an instance of a static class. A static class cannot be derived.
21) What is the visibility qualifier used for? (Select the best option)
a. Used for specifying different visibility for the get and set accessors of a property or
an indexer
b. Setting the visibility of the accessor get and set to public even though the property visibility
is set to protected
c. Setting the visibility of the accessor and set to public even though the property visibility is
set to internal
d. All of the above

A) Correct. The visibility qualifier is used for specifying different visibility for the get and set
accessor of a property or an indexer.
22) Which of the following is true about Nullable Types? (Select the best option)
a. A Value type variable can be assigned the value of null
b. HasValue and Value properties are used to test for null and to retrieve the value of a
Nullable type
c. The System.Nullable.GetData property is used to return the assigned value
d. A and C
e. A and B
f. All of the above

E) Correct. Nullable Types is a value type variable that can be assigned the value of null. The
HasValue and Value property is used to test for null and to retrieve the value of a Nullable
type.
Explanation

Nullable Types are value type variable that can be assigned the value of null. The HasValue
and Value property is used to test for null and to retrieve value of a Nullable type. The
System.Nullable.GetValueorDefault property is used to return the assigned value or the
default value for the underlying type
23) What are delegate inferences used for? (Select the best option)
a. Used to declare a delegate object
b. Used to wrap a method to a delegate object
c. Used to make a direct assignment of a method name to a delegate variable without
wrapping it first with a delegate object
d. A and C
e. All of the above

C) Correct. A delegate inference is used to make a direct assignment of a method name to a
delegate variable.
24) What is true about Generic types? (Select the best option)
a. System.Collections.Generic namespace in the .NET class library contains the generic
collection classes
b. You can create your own generic interfaces, classes, methods, events and delegates
c. Reflection can be used to understand the information on the types used in a generic
datatype
d. All of the above

D) Correct. System.Collections.Generic namespace is the .NET class library that contains the
generic collection classes. Using generic types we can create own generic interfaces,
methods, events and delegates. Reflection is used to know the information on the types used
in a generic datatype.
25) Which of the following is used as the global namespace qualifier?
a. ::global
b. global::
c. global:
d. None of the above

B) Correct. The global namespace qualifier is global::
26) Which of the following features were introduced in C# 2.0
a. Partial Types
b. Arrays
c. Inline Warnings
d. Global namespaces
e. Options A, B, & C
f. Options A, C, & D

F) Correct. The features introduced in C# 2.0 are Partial Types, Inline Warnings and Global
namespaces while arrays were introduced in C# 1.0.

Knowledge Check 4a – Solution
27) What are Use Case diagrams typically used for? (Select the best option)
a. Communicate high-level functions of the system and the system’s scope

b. Represent the relationship between objects
c. Represent the sequence of actions performed by objects
d. All of the above
a. Correct. Usually use cases are used during the design and analysis
phase of a project. This identifies the partition of the system into
functionalities. The system is separated into actors and use-cases.
b. Explanation for Faculty:
A is correct. Usually use cases are used during the design and analysis phase of a project. This
identifies the partition of the system into functionalities. The system is separated into actors and usecases.
B is incorrect. Relationships between objects are usually represented by various UML notations.
C is incorrect because sequence of actions is depicted by Sequence Diagrams. The diagram models
the flow of logic within the system and one of the most important design-level models of application
development.

28) What is a Design Pattern? (Select the best option)
a. A design pattern represents any C# object
b. A design pattern is a documented best practice
c. A design pattern represents Business Logic
d. A and B
e. All of the above
B) Correct. A design pattern is a documented solution to a common recurring software design
problem.

29) Which of the following is a drawback of design patterns? (Select the best option)
a. Design Patterns enable the large-scale reuse of software architectures.
b. Design patterns help to improve developer communication
c. Design patterns explicitly capture expert knowledge and design tradeoffs and
make this expertise more widely available
d. Design patterns do not lead to direct code reuse
e. All of the above
A) Correct. Because certain design patterns are specialized to address specific issues, they do not
allow for direct reuse of code very often.

30) Which Design Pattern ensures a class has only one instance and provides a global point
of access to it? (Select the best option)
a. Adapter Pattern
b. Bridge Pattern
c. Façade Pattern

d. Interpreter Pattern
e. Singleton Pattern
A) Correct. Singleton is a class where only a single instance can exist. Usually, the constructor of a
class that exhibits a singleton pattern is declared private.
31) What does an Actor in a Use Case diagram represent? (Select the best option)
a. A person
b. An organization
c. An external system
d. A & C
e. All of the above
Correct. All are correct options. The actor can be a person, an organization or an external system that
plays a role in one or more of the interactions in the system. Usually actors are drawn as stick figures.
32) What does a design address? (Select the best option)
a. How to meet the business requirements
b. When to meet the business requirements
c. Why to meet the business requirements
d. Where to meet the business requirements
A) Correct. The design addresses the specific ways to meet the business requirements.

33) Which of the following are detailed design activities?
a. Specifying relationships among objects
b. Specifying sequence of actions among objects
c. Specifying standard solutions to common problems
d. Specifying system responses to user requests
e. A, B and D
F) Correct. These three points are detailed design activities.

34) Which of the following are goals of the Design Phase?
a. Ensure a full understanding of the implementation blueprint
b. Detail how the application will meet the identified functional requirements
c. Communicate application design to development teams
d. As an input deliverable for development budget estimate
e. A, B and C
E) Correct. These three points are goals of the design phase.

35) Which design pattern lets a class defer instantiation to subclasses? (Select the best
option)
a. Abstract Factory
b. Factory Method

c. Singleton
d. Façade
Correct. Factory Method creates an instance of several derived classes.
Explanation for Faculty:
A is incorrect. Abstract Factory creates an instance of several families of classes.
B is correct. Factory Method creates an instance of several derived classes.
C is incorrect. Singleton is a class where only a single instance can exist. Usually, the constructor of a
class that exhibits a singleton pattern is declared private.
D is incorrect. Façade Pattern makes a single class represent an entire subsystem.

Use the following diagram for questions 10-13
AA
Class 4

Class 1
-attribute1
-attribute2
+operation1()
+operation2()
+operation3()

0..*

1..1

+operation1()
+operation2()
+operation3()
+operation4()
+operation5()

BB
CC

Class 2
-attribute1
-attribute2
-attribute3
+operation1()

Class 5

Class 3
-attribute1
+operation1()

*

1

DD

36)

Referring to the above diagram, what does arrow AA represent? (Select the best option)
a. Generalization
b. Multiplicity
c. Association
d. Composition

37)

Referring to the above diagram, what does arrow BB represent? (Select the best option)
a. Composition
b. Generalization
c. Association

d.

38)

Referring to the above diagram, what does arrow CC represent? (Select the best option)
a.
b.
c.
d.

39)

Multiplicity

Multiplicity
Composition
Generalization
Association

Referring to the above diagram, what does arrow DD represent? (Select the best option)

a. Composition.
b. Multiplicity.
c. Generalization.
d. Association.
Feedback: (for Questions 10 – 13)
Association is denoted by a direct line between two classes. It is the weakest of relationships.
Generalization (or inheritance relationship) is denoted by a solid line with a large hollow triangle.
Multiplicity uses numerals at either end (or both ends) of the association relationship. “1” means
“exactly one”, “0..1” means “zero or one”, “0..*” means “zero or more”, etc.
Composition is denoted by a line with a “filled diamond” at the end.
Use the following diagram for questions 14-16.
Sequence Diagram

EE

Message B()

FF
Message C1()

Message C2()
Message D1()

Message D2()

GG

Message1

40)

Referring to the above diagram, what does arrow EE represent? (Select the best option)
a. Sequence

b. Method
c. An Actor
d. An Object
A) Incorrect. Usually inside the box is the name of the reference variable referring to the object.
B) Incorrect. Usually inside the box is the name of the reference variable referring to the object.
C) Incorrect. Usually inside the box is the name of the reference variable referring to the object.
D) Correct. Usually inside the box is the name of the reference variable referring to the object.
41)

Referring to the above diagram, what does arrow FF represent? (Select the best option)

a. Instantiate an object
b. Access the member attributes
c. Invoke the member method
d. All of the above
A) Incorrect. In sequence diagrams, you could see which methods are invoked in the program flow.
B) Incorrect. In sequence diagrams, you could see which methods are invoked in the program flow.
C) Correct. In sequence diagrams, you could see which methods are invoked in the program flow.
D) Incorrect. In sequence diagrams, you could see which methods are invoked in the program flow.
42)

Referring to the above diagram, what does arrow GG represent? (Select the best option)

a. Return value
b. An object
c. Active
d. Iteration
A) Correct. A broken line with an arrowhead pointing to the left is used to denote a return value. This
is optional but for clarity of the diagrams, they may be included.
Use the following diagram for questions 16 -19
.
43) Referring to the above diagram, what does arrow HH represent? (Select the best option)

44)

a. Generalization
b. Association
c. Aggregation
d. Dependency
Referring to the above diagram, what does arrow II represent? (Select the best option)
a.
b.
c.
d.

45)

Actor
Association
Dependency
Composition

Referring to the above diagram, what does arrow JJ represent? (Select the best option)
a. Actor

b. Dependency
c. Use Case
d. Multiplicity
HH

Application Name

X

<>

II
Inclusion

Y

<>

JJ
Extension
KK

Child

46)

Referring to the above diagram, what does arrow KK represent? (Select the best option)
a.
b.
c.
d.

Association
Use case
Actor
Generalization

Feedback:
Following the notes for questions 10 – 13 with some additions on actors and use cases.
Association is denoted by a direct line between two classes. It is the weakest of relationships.
Generalization (or inheritance relationship) is denoted by a solid line with a large hollow triangle.
Multiplicity uses numerals at either end (or both ends) of the association relationship. “1” means
“exactly one”, “0..1” means “zero or one”, “0..*” means “zero or more”, etc.
Composition is denoted by a line with a “filled diamond” at the end.
Actors are usually drawn as stick figures. He can be a person, an organization or an external system
that plays a role in one or more of the interactions in the system.Use Cases describes an action that
provides something of measurable value to an actor, and is drawn as a horizontal eclipse.

Knowledge Check 5a – Solution


47) What is testing? (Select the best option)
a. A software problem
b. A structured way of validating the requirements and ensuring that the solution
meets the expectations
c. A deliverable that defines the characteristics of a service and the relationship between the
service provision units
d. All of the above
B) Correct. Testing is a structured way of validating requirements and ensuring the product meets
expectations. In addition, testing also identifies the accuracy and quality of the developed product.

48) Which of the following comprise the scope of the testing process? (Select all that apply)
a. Functional
b. Technical
c. Operational
d. Maintenance
e. Financial
A) Correct. Functional is a scope of the testing process.
B) Correct. Technical is a scope of the testing process.
C) Correct. Operational is a scope of the testing process.
D) Correct. Maintenance is a scope of the testing process.

49) What is the purpose of testing? (Select the best option)
f. Detect and resolve errors as early as possible
g. Verify that the application meets the requirements
h. Train and pass the ownership to the users
i.

Ensure client operations are functioning upon deployment of the application

j. All of the above
Correct. All of the options describe the purpose of testing. Additionally, the goal of any software
development is to create high quality applications, which can be achieved by a thorough testing
process.

50) All of the following are valid groups of test conditions except (Select the best option)
a.
b.
c.
d.

Test conditions which involve successful operations
Test conditions which determine the component’s capability to detect and handle errors
Test conditions which involve unintentional successful operations
Test conditions which determine the component’s capability to handle exceptional
circumstances
A) Correct. In testing, every test condition contains an expected result. Ideally, the expected results
will be the same as the actual result.

51) Stage containment is achieved by practicing which of the following? (Select the best option)
a. Verification
b. Validation

c. Testing
d. Entry and Exit criteria
e. All of the above
A) Correct. All are correct options. Stage containment identifies problems in the system during
development before they are passed to the next stage. This is achieved by verification, validation,
testing and entry and exit criteria.

52) Which of the following is normally true? (Select the best option)
a. Developer will perform the component test
b. Tester will perform the product test
c. Client will perform the user acceptance test
d. All of the above
e. None of the above
D) Correct. All are true statements.

53) Which of the following describes a performance test? (Select the best option)
a. Testing input data ranges
b. Testing member method correctness
c. Testing response time
d. Testing return value
C) Correct. Performance Tests generally include load, stress, stability, throughput testing and
ongoing performance monitoring including response time. The performance test stage generally
covers both application and technical architecture performance issues.

54) What does a Test Plan contain? (Select the best option)
a. Test condition
b. Test result
c. Test script
d. All of the above
Correct. TCER stands for Test Conditions and Expected Results; also included in the TCER is the
Test script.

55) Which of the following statements about traceability is true relative to the V-Model? (Select
the best option)
a. Component test traces back to the build activity
b. Assembly test traces back to the design activity

c. UAT traces back to the analyze activity
d. All of the above
e. None of the above
D) Correct. All of the statements are true.

56) Which of the following is an advantage of NUnit? (Select the best option)
a. NUnit tests allow you to write code faster while increasing quality
b. NUnit is elegantly simple
c. NUnit tests check their own results and provide immediate feedback
d. All of the above
e. None of the above
D) Correct. All are an advantage of NUnit.

57) What is the worst possible scenario that could occur given a lack of stage containment
during the testing process? (Select the best option)
a. Flawed components are detected and sent back to the build phase
b. Flaws in the application are only detected during the deployment phase
c. Components fail to integrate and are reevaluated for further design
d. Flaws are detected during requirements analysis, delaying the build
Correct. While the other scenarios are bad, this is the worst case. Only detecting flaws during the
deployment will potentially delay deployment while all the flaws are sorted out and addressed.

58) Which of the following is true about stage containment? (Select the best option)
a. Identifies problems in the system during the development before they are passed
to the next stage
b. Helps to build quality into the system
c. Minimizes cost and effort for fixing problems
d. Finds problems or errors in the stage they originate/occur
E) Correct. All of the statements about stage containment are true.

59) What happens if component tests are performed incorrectly? (Select the best option)
a. Subsequent testing may be delayed
b. Additional time and resources may be required
c. Installation of the client’s system may be delayed
d. A & B

e. All of the above
E) Correct. All of the options are after-effects of performing component tests erroneously.

60) For which of the following is NUnit best utilized? (Select the best option)
a. Performance Test.
b. Unit Testing and Regression Testing
c. Product Test.
d. Assembly Test.
A) Correct. NUnit is best used for Unit testing and Regression testing. For the other tests, there are
various established mechanisms of executing the test process

61) What namespace is used for NUnit class?
a. NUnit.Framework
b. NUnit.Test
c. TestNUnit
d. UnitNTest
A) Correct. A test class is created using NUnit.FrameWork namespace.

62) Which of the following best describes the purpose of the Assert methods of NUnit? (Select
the best option)
a. To determine the correctness of the expected results
b. To ensure the member methods are compiling properly
c. To validate the business logic
d. None of the above
A) Correct. There are many Assert.Xxx() methods of NUnit, like Assert.AreEqual, Assert.IsTrue,
Assert.IsNotNull, etc., which aim to verify the correctness of each result in the code.

Knowledge Check 6A – Solution
63) Which of the following is an SQL command? (Select the best option)
a.
b.
c.
d.
e.

INSERT
COMMIT
UPDATE
DELETE
All of the above

E) Correct. All are valid SQL commands.

64) SELECT *
FROM Customers
WHERE Phone LIKE ‘6_6%’
Which Customer Phone column will be selected when the above query is executed? (Select the
best option)
a. 626 362-2222
b. 416 626-6232
c. 623 455-6545
d. All of the above
A) Correct. The underscore ‘_’ wildcard matches any single character in that particular position. The
percentage sign ‘%’ matches to any number of characters in that specific position. Only option A
satisfies this requirement for ‘6_6%’.

65) Which of the following “ORDER BY” clauses displays the result in a descending order by
the attribute salary? And, if two records have the same attribute value for salary the sorting
criteria is in an ascending order by the attribute value for job_id? (Select the best option)
a. ORDER BY salary DESC and job_id ASC
b. ORDER BY job_id ASC and salary DESC ASC
c. ORDER BY salary DESC, job_id ASC
d. ORDER BY job_id ASC, salary DESC
e. None of the above
A) Correct. This option will display records of salary sorted in descending order with a secondary sort
by job_id in ascending order.
Explanation for Faculty:
Order By clause is used to sort data selected from the table in a specified order and can only be used
in SELECT statements. The syntax is “ORDER BY columns ASC|DESC”. By default, it is set to
ascending order.

66)
1 Select savings account
2
3 Update savings account
4
5 Select checking account to update
6
7 Update selected checking account with the values from the savings account
8

Given the above pseudo code that transfers funds from a savings account to a checking
account, where would you add a COMMIT statement to complete the transaction? (Select
the best option)
a. After line 1
b. After line 3

c. After line 5
d. After line 7
A) Correct. Usually a commit statement is added only when all series of commands (or the whole
complete transaction) is finished.

67) Which statement about SqlDataReader in ADO.NET is true?
a. It is the most efficient object in ADO.Net for quickly reading data
b. Data can be read only in a forward stream of rows
c. .ExecuteReader method of SqlCommand object is used to create a SqlDataReader
d. All of the above
A) Correct. All of the above statements for SqlDataReader are correct

68) Which of the following is true about ADO.NET?
a. Is an object – oriented set of libraries that allow you to interact with data sources
b. Classes are found in System.Data.dll
c. ADO.Net classes are integrated with XML classes
d. Contains .Net framework Data providers for connecting to a database
e. All of the above
A) Correct. All of the statements about ADO.Net are true.
69) What is SQL (Structured Query Language)? (Select the best option)
a. A software problem
b. A structured way of validating the requirements and ensuring that the solution meets the
expectations
c. A standard interactive and programming language for getting information from and
updating a database
d. All of the above
C) Correct. SQL has become an industry standard for creating, updating and querying database
management systems.

70) With SQL, how do you select a column named “FirstName” from the table named
“Persons”? (Select the best option)
f. Extract FirstName from persons
g. SELECT Persons.FirstName
h. SELECT FirstName from Persons
i. None of the above
C) Correct. The syntax for the Select command is “SELECT column FROM table”.

71) Which of the following is true about SQL statements? (Select the best option)

a. SQL statements are not case sensitive
b. SQL statements can be on one or more lines
c. SQL statements are optionally ended with “;”
d. All of the above
e. None of the above
D) Correct. All of the statements are true.
71) Character strings and dates in the Where clause must be enclosed in: (Select the best

option)
k. Single Quotation marks (‘)
l.

Parenthesis

m. Double Quotation marks (“)
n. None of the above
A) Correct. Single quotation marks are used to enclose characters, strings and dates.

72) Which SQL statement is used to insert new data in a database? (Select the best option)
a. Add New
b. Add Record
c. Insert Into
d. Insert New
e. None of the above
C) Correct. Insert Into is the only command for inserting data.

73) In SQL, how do you select all the records from a table named “Persons” where the value
of the column “FirstName” is “Peter”? (Select the best option)
f. SELECT [all] FROM Persons WHERE FirstName=’Peter’
g. SELECT * FROM Persons WHERE FirstName=’Peter’
h. SELECT * FROM Persons WHERE FirstName LIKE ‘Peter%’
i.

SELECT [all] FROM Persons WHERE FirstName LIKE ‘Peter’

B) Correct. This option retrieves records from the Persons table with Peter as the firstname.

74) Which SQL keyword is used to sort the result-set? (Select the best option)
f. Group By
g. Arrange By
h. Order By
i.

Sort By

C) Correct. ‘ORDER BY’ is the best keyword used to sort either by ascending or descending.
75) Which statement is used to change “Hansen” into “Nilsen” in the “LastName” column in the
Persons table? (Select the best option)
a. UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

b. MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen
c. UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
d. MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
C) Correct. This option contains the correct syntax for updating rows in a table.

76) Which of the following are Transaction Control statements? (Select the best option)
a. Commit
b. Rollback
c. Order By
d. A & B
e. All of the above
A) Correct. Both Commit and Rollback are transaction control statements. Commit is used to commit
the current transaction, making all the previous changes permanent, while rollback aborts the
current transaction, discarding all the updates of that particular transaction.

77) Which of the following is an ADO.NET Data provider (Select the best option)
a. OleDb Data Provider
b. ODBC Data Provider
c. Oracle Data Provider
d. SQL Data Provider
e. All of the above
E) Correct. All of the above listed data providers are ADO.NET data providers.

78) Match the concepts in the list on the right with their correct descriptions.
b

1) Retrieves a single value (for example, an
aggregate value) from a database

a) ExecuteXmlReader

d

2) Executes commands that return rows

b) ExecuteScalar

c

3) Executes commands such as Transact-SQL
INSERT, DELETE, UPDATE statements

c) ExecuteNonQuery

a

4) Sends the CommandText to the Connection and
builds an XmlReader object

d) ExecuteReader

Feedback:
A) ExecuteScalar retrieves a single value (for example, an aggregate value) from a database
B) ExecuteReader executes commands that return rows
C) ExecuteNonQuery executes commands such as Transact-SQL INSERT, DELETE, UPDATE, and
SET statements
D) ExecuteXmlReader sends the CommandText to the Connection and builds an XmlReader object.

79) Which of the following is the correct Connection string format used for connecting a SQL
Server Database? (Select the best option)
f. SqlConnection conn = new SqlConnection(“Data Source = DatabaseServer;
Initial Catalog=Northwind;User ID = YourUserID ; Password
=YourPassword”);
g. SqlConnection conn = new SqlConnection(“Data Source = (local);Initial Catalog =’’;
Integrated Security= ‘Northwind’);
h. SqlConnection conn = new SqlConnection(“Initial Catalog = Northwind”);
i.

SqlConnection conn = new SqlConnection(“Data Source = (local);Initial Catalog =’SSPI’;
Integrated Security= ‘Northwind’);

A) Correct. A valid SQL Connection should contain following parameters: database server name,
name of the database and security credentials.

Knowledge Check 7a – Solution
80) What is the architecture of a system? (Select the best option)
a. A comprehensive framework that describes the system’s form and structure, its
components and the relationship among them
b. Defines the requirements obtained from a client
c. Defines how a user interacts with the system
d. Defines the validation criteria for input data
A) Correct. Architecture is a structure or structures of the system that is comprised of software
elements and the relationship among them.
Explanation for Faculty:
A is correct. It is a structure or structures of the system that is comprised of software elements and
the relationship among them.B is incorrect. The requirements by the client are first defined before a
specific architecture is decided to address the solution.C is incorrect. Use Cases define how a user
interacts with the system.D is incorrect. Validations are handled by specific components within the
application.
81) Which of the following describes how stubs can be used? (Select the best option)
a. Reduce dependency between developers
b. Simulate the defined functionality of a class which may or may not have been developed
yet
c. Act as a proxy for a class whose implementation resides in a remote location
d. A and B
e. All of the above
E) Correct. All of the statements describe the purpose of stubs.

82) In 3-tier architecture, which of the following is handled by the Application layer? (Select the
best option)
a. Form validations
b. Data Manipulation
c. Business Logic

d. B and C
e. All of the above
D) Correct. The Data Manipulation and Business Logic is handled by the Application Layer.

83) What is the role of the View in MVC? (Select the best option)
a. To render the information to the client
b. To access the database
c. To access the application layer
d. To control the program flow
B) Correct. View in the MVC model is for the Presentation Layer, which renders the information to
the client.
Explanation for Faculty:
A is correct. View in the MVC model is for the Presentation Layer. It can be done using ASP. NET,
HTML, etc. Additionally, M stands for the model, which may be Business Components. C stands for
Controller.

84) VSS is used for which of the following? (Select the best option)
a. Used to manage multiple projects regardless of the file types
b. Stores both the old version and new version of files in the database
c. Provides access control of files based on person and groups
d. For integration with Visual Studio 2005, Visual Basic and other development tools
e. All of the Above
E) Correct. VSS is used to manage multiple projects, Stores both old version and new version of files
in the database , provides access control of files and can be easily integrated with visual studion.Net,
visual basic etc.

For question 6, review the code sample below.
static void Main(string[] args)
{
int x = 10, y = 0, c;
try
{
c = x / y;
}
catch (Exception e)
{
Console.WriteLine(“I am in general Exception”);
}
catch (DivideByZeroException ex)
{
Console.WriteLine(“I am in Divide by Zero Exception”);
}}

85) What will be the output of the above code sample

a.
b.
c.
d.

The code will not display any thing
Will display “I am in Divide by Zero Exception” statement
Will display I am in general Exception” statement
Will not compile and display error “A previous catch clause already catches all
exceptions of this or of a super type (‘System.Exception’)”

e. Will display both the statements viz. “I am in Divide by Zero Exception” and “I
am in general Exception”

A) Correct. D is correct answer. The code sample should throw an DivideByZeroException
exception, but the previous catch is of super type, which catches all exception so will display “I am
in General Exception”
86) In the following line of code, what does the variable pnow contain? (Select the best option)
DateTime pnow = DateTime.Now;
a. Leap Year
b. An instance of a DateTime class
c. The current DateTime
d. An instance of the Date class
A) Correct. C is the correct answer. DateTime.Now will return the current system date and time
87) Which of the following statements are true? (Select the best option)
a. When checking in a file to VSS, you should always write comments about the file version
b. VSS will allow you to share files between two or more projects
c. You should only check in files without errors
d. B and C
e. All of the above
B) Correct. All three are true statements. You should write comments whenever you commit files to
the VSS to easily track the revision history. You can share file between two or more projects.
Also, never commit files with errors.
Explanation for Faculty:
F is the best answer F is the best answer because A, B and C are true statements. You should write
comments whenever you commit files to the VSS to easily track the revision history. You can share
file between two or more projects. Also, never commit files with errors. .
88) To create a stub for a class, the programmer needs to: (Select the best option)
a. Know the contract design about the class that the stub is supposed to simulate
b. Know the exact implementation of the class that the stub is supposed to simulate
c. Change the public interface of the class that the stub is supposed to simulate
d. All of the above
e. None of the above
Correct. The programmer needs to know at least the method signatures and the behavior of
the specific method (i.e., the API). This is the benefit of designing by contract wherein two
parties agree to implement the same set of API so all components integrate together.
89) What is NAnt ?
a. A .Net build tool, designed to work with any .NET language.
b. A tool to combine projects written in different .NET languages in one build
c. It is an automated continuous Integration Server

d. All of the above
A)

Correct. A & B are correct. NAnt is a .NET build tool designed to work with any .NET
language. It can also be used to combine project written in different .NET languages in one
build. So A & B is partly correct

————————————————Can SOAP messages be used by programs running on the same machine to exchange messages?
Yes
No
Depends on the Architecture of the machine
ANSWER 1
——————————-Popup boxes supported by Javascript
Alert
Confirm
Prompt
Msgbox
CORRECT_ANSWER 1,2,3
———————————————Which method of the DbCommand object executes a DML statement against a connection and returns
the number of rows affected?
ExecuteReader()
CreateObjRef()
ExecuteNonQuery()
ExecuteScalar()
ANSWER 3
————————————-InsertCommand ,UpdateCommand and DeleteCommand properties are available in
_______ object.
DataAdapter
DataReader
DataSet
Command

ANSWER 1
————————————–__ enables you to create different views data from the Datatable object.
DataAdapter
DataSet&lt
DataView&lt
Command&lt
ANSWER 3
—————————————sum=num1+num2
document.write(sum);
What is the value of sum in the script
0
Garbage value
1
Error – No Output
Ans: 4
———————————Which of the following components of a data provider is used to retrieve, insert, delete, or modify data
in a data source?
Connection
Command
DataReader
DataAdapter
ANSWER 2
———————————How does Code Coverage helps while developing an application?
It helps to understand the load the application can take.
Code Coverage doesn’t help while developing an application
It helps to understand the max number of users that can operate the application.
It helps to understand the level to which the source code of the application has been tested

ANSWER 4
——————————-When is the TestCleanUp() attribute called ?
Before the execution of TestMethod()
After the execution of TestClass()
After the execution of TestMethod()
When the TestClass() loads
ANSWER 3
—————————-A service provider describes its service using
WSDL
UDDI
XML
None of the above
ANSWER 1
——————————-Select the statements which are not true about the MDD Architecture
Boundaries allow the architect to communicate the scope of the solution.
Boundaries, Structure and Domain Model are the aspects of the MDD architecture.
Models facilitate to understand and communicate complex ideas effectively.
All of the above
ANSWER 4
——————————-If the code on line 3 executes successfully.
If the code on line 3 throws an exception.
If the code on line 1 throws an exception.
If the code on line 5 throws an exception.
1,2,4
void Page_Load(Object Sender, EventArgs c)
The above programme will generate which type of error?

Runtime error
Compilation error
Configuration error
Parser error
ANSWER 2
——————————————A _________ subquery executes as many times as the inner query executes.
Subquery with the ANY clause.
Subquery with the ALL clause.
Subquery with the IN clause.
Non-corelated.
Co-related
ANSWER 5
————————————Code Analysis is done for _
Both Managed and Unmanaged Code
Part of build process and check-in policy
Data driven tests and Code Coverage
Sampling and Instrumentation
ANSWER 1,2
——————————————Following is not the type of test covered in VSTS Test Edition
Web Test
Load Test
Generic Test
Ordered Test
None of the above
Given using system namespace Test{ insert code here
public int getId() {return 101; }
private int getId() {return 101; }

protected int getId() {return 101;}
int getId() { return 101;}
ANSWER 1,2,3,4
———————————Given View the code snippet, and choose appropraite .
An exception is thrown
Compilation fails
Prints 3
Prints 0
ANSWER 2
————————————–1 Inheritence: What will be the output of the program?
Prints hi two
Prints two
Prints hi hello
Prints hi
Prints hello
ANSWER 4
—————————————–What will be the output of code
125
25
5
Any Random Number gets printed
ANSWER 1
——————————————–If we want to perform a test on the HTTP request, which of the following test would be used?
Web Test
Load Test
Generic Test

Ordered Test
None of the above
ANSWER 1
——————————————-If you want to separate your server-side code from your client-side code on a Web page, what
programming model should you implement?
Separation model
Code-Behind model
In-Line model
ClientServer model
ANSWER 2
———————————————–In ASP, which of the following attributes are applicable to Form control
Action
Method
Get
Post
ANSWER 1,2
————————————————-In SOA, Which of the following tier provides adapters for the various types of platforms which cannot
natively expose services?
Provider Adapter Tier
Consumer Adapter Tier
Consumer Provider Interaction Tier
Service Provider Tier
None of the above
ANSWER 1
——————————————–The __ functionality of ACA.NET enables customers to quickly realize the benefits of serviceenabled applications
Programming

ASA
SOA
SOAP
ANSWER 3
————————————————-The ACA.NET and ___ provide a model-driven surface that accelerates
development
Service Factory
Aspect Factory
Soap Factory
Web Factory
ANSWER 1,4
————————————————View the code Snippet, evaluate the result.
Tony Allen age 32
Tony Allen, age 32
Tony Allen; age 32
None of the above
ANSWER 2
—————————————————-Which of the following is not an of alter statement?
drop column
modify
add
ANSWER 2
—————————————————Which of the following is true about GROUP BY clause:brgt;1) All the non-aggregate columns have
to be used in the group by clause.brgt;2) Having by clause cannot be used without the GROUP BY
clause.
Statement 1 is true.
Statement 2 is true.

Both the statements are true.
None of the statements are true.
ANSWER 3
————————————————While viewing an ASP.NET page, if we are monitoring the following steps, is the web page being
viewed a static web page or dynamic web page?brgt;i. Client Sends the HTTP request to the
serverbrgt;ii. Server Executes the program responsible for generating the requested pagebrgt;iii.
Program generates the HTML for the requested pagebrgt;iv. Server sends the HTML file as an HTTP
Responsebrgt;v. Browser displays the HTML page
Static Web Page
Dynamic Web Page
ANSWER 2
——————————————————–You make most initial contacts to a page using a command and you handle the
subsequent interactions with
commands.
Get, Post
Post, Get
Get, Head
Post, Head
ANSWER 1
———————————————————Controls that incorporate logic to enable you to what users enter for input controls such as the TextBox
control are called as __
Web Server Controls
HTML Controls
Validation Controls
User Controls
ANSWER 3
——————————————–To retrieve the information identified by the URI specified by the request we should use


Post
Get

Head
None of the above
ANSWER 2
——————————————–Required to implement AccountInfo abstract class in Savings class.
To implement PrintAccountInfo function override keyword is needed.
public override void PrintAccountInfo()
public void override PrintAccountInfo()
void override PrintAccountInfo()
public void PrintAccountInfo()
ANSWER 1
—————————————-Abstract
What is the output of the code
100, 200, 110
100, 200, 100
Code would result in an error – Can not create an instance of the abstract class
None of the above
ANSWER 3
———————————-John wanted to create an XML file to store the user’s information. He coded it as followsbrgt;amp;?xml
version=1.0?amp;gt;brgt;amp;usernameamp;gt;Johnamp;usernameamp;gt;brgt;amp;ageamp;gt;30amp;
ageamp;gt;brgt;brgt;Will this code work for him?
Yes
No
ANSWER 2
—————————————-Which of the following statements are true about SOAP
It’s a directory service which is used to list the applications that can provide services.
It enables applications to find services and decide on how data and services can be shared.

It enables applications to agree on how data and services are to be communicated.
None of the above
ANSWER 3
————————————–Which of the following statements are true about the Service Provider The Service Provider creates web services and publishes the interface and access information to the
service broker.
The Service Provider makes decision regarding – which of his services needs to be exposed, under
which category the service should be listed and what sort of partner agreements are required.
The Service Provider is responsible for making the Web service interface and implementation access
information available to any service requestor.
The Service Provider locates entries in the broker registry using various find operations
ANSWER 1

  1. What is the output of the following Command
    $ls -R | wc – lw | cat > sampleFile
    1>The output of ls command is stored in SampleFile
    2>The output of wc command is stored in SampleFile
    3>The output of ls is treated as input to wc and the count is stored in SampleFile
    4>The output of ls is treated as input to wc and the count is displayed and stored in SampleFile
    ANSWER>3
  2. What is the output of the following command
    $ cat File1>File2>File3
    1>Copies the contents from File1 to File2 and File3
    2>It is a wrong command – gives error
    3>Copies File1 contents to File3
    4>Copies File1 to File3 and creates an empty file File2
    5>None of them
    ANSWER>4
  3. What is the command to Print the searched pattern with the line numbers in File1
    1>$grep -N “Accenture” File1
    2>$grep -nv “Accenture” File1
    3>$grep -n File1
    4>$grep -n “Accenture” File1
    5>All are correct
    6>None
    ANSWER>4
  4. What is the output of the following command
    $rmdir dir1 dir1/dir2/dir3
    1>deletes dir1 and dir3 directories
    2>deletes dir1 directory 3>deletes dir1 dir2 and dir3 directories
    4>error
    ANSWER>4
  5. In the vi editor to delete a char
    1>h
    2>j
    3>x
    4>k
    5>l
    ANSWER>3
  6. To save a file without quitting the vi editor is done using the command
    1>:q
    2>:w
    3>:w!
    4>:wq
    5>:q!
    ANSWER>2
  7. What is the output the following command
    % sort -t “|” +3 -5 Students
    1>The records will be sorted based on 4th to 5th columns
    2>The records will be sorted based on 3rd and 5th columns
    3>The records will be sorted based on 3rd to 5th columns
    4>The records will be sorted based on 3rd to 4th columns
    ANSWER>1
  8. Unix file system has which of the following file structure
    1>Tree Structure
    2>Standard Structure
    3>Hierarchical Structure
    4>None of the above
    ANSWER>3
  9. In unix grep-n command displays the
    1>Line matching the pattern along with its line number
    2>Only a count of the line that match a pattern
    3>Prints out all those lines that do not match the pattern
    4>None of the above
    ANSWER>1
  10. Which of the following represents an absolute path?
    1>../home/abc.txt
    2>bin/cat
    3>abcd/
    4>/usr/bin/cat
    ANSWER>4
  11. Kernel Manage
    1>Entire resources of the system 2>Schedules the work done by the CPU
    3>Enforces the security scheme
    4>a & b
    5>b & c
    6>a b & c
    ANSWER>6
  12. Which option of grep displays the count of lines matching the pattern
    1>-c
    2>-nc
    3>-v
    4>-lc
    5>-ln
    ANSWER>1
  13. You have a file with numerical data in it (i.e file with list of numbers in it). To sort this data which
    command/method you will prefer most. Assume that list is reasonably small and Quick output is high priority.
    1>sort
    2>sort –n
    3>Write a C/C++ program. Use quick sort.
    4>Write a C++ program. Use STL sort algorithm
    ANSWER>2
  14. You can always return to your home directory by using the command
    1>cd /
    2>cd \
    3>cd HOME
    4>cd ..
    5>cd
    ANSWER>5
  15. You are currently placed in “trng” directory placed under the directory “training”. The command to move the
    file “file1” from “trng” directory to “data” directory placed under the directory “training” is:
    1>mv file1 data
    2>mv file1 data/.
    3>mv file1 ../data/.
    4>mv ../file1 ../data/.
    5>mv file1 /data/.
    ANSWER>3
  16. You are currently placed in “data” directory placed under the directory “training”. The command to copy the
    file “file1” from “data” directory to “trng” directory placed under the directory “training” is:
    1>cp file1 ../trng/.
    2>cp file1 /trng/.
    3>cp ../file1 ../trng/.
    4>cp file1 /trng/.
    5>cp file1 trng/.
    ANSWER>1
  17. who | wc –l
    What is the output of the following command if 10 users are connected? 1>It will display the list of all the users connected.
    2>It will display an error in the command
    3>10
    4>None of the above
    ANSWER>3
  18. Which unix command gives the number of lines , words and characters.
    1>cat
    2>ls
    3>wc
    4>grep filename
    ANSWER>3
  19. Which option of sort allows you to sort data in descending order
    1>-r
    2>-o
    3>-f
    4>None of the above
    ANSWER>1
  20. Which option of ls will allow you to display the files in reverse order
    1>r
    2>-r
    3>R
    4>-RNone of the above
    ANSWER>2
  21. What command do you use to copy files from all sub directories to another directory
    1>$cp -r Dir1 Dir2
    2>$cp -i Dir1 Dir2
    3>$cp -a Dir1 Dir2
    4>$cp -m Dir1 Dir2
    ANSWER>1
  22. The command used to slice the files horizontally is
    1>cut
    2>paste
    3>head
    4>cat
    ANSWER>3
  23. In the following command
    $paste -d “;:” Student1 Student2
    1>-d stands for define
    2>-d stands for difference
    3>-d stands for delimeter
    4>None
    ANSWER>3
  24. Which of the following commands will display the names of hidden files ? 1>ls –h
    2>ls –a
    3>ls –l
    4>ls –x
    5>ls –p
    ANSWER>2
  25. Which of the following commands will display the details of directories only of the current directory ?
    1>ls –d
    2>ls -l | grep “d$”
    3>ls -l | grep “^d”
    4>ls -l | grep “d^”
    5>ls -l | grep “$d”
    ANSWER>3
  26. Which character must be specified at the end of the command in order to execute that command in the
    background ?
    1>&
    2>^
    3>%
    4>$
    5>#
    ANSWER>1
  27. If there are 5 files in the current directory and if ls -l | wc -l command is given in the current directory, then
    the output of this command will be
    1>5
    2>all the filenames will be displayed
    3>6
    4>all the lines of all the 5 files.
    5>syntax error will be displayed
    ANSWER>3
  28. Which of the following escape sequences can be used to keep the cursor on the same line after displaying the
    output with echo command ?
    1>\a
    2>\b
    3>\c
    4>\k
    5>None of the above
    ANSWER>3
  29. ln -s will create —– link to the file
    1>soft link
    2>symbolic link
    3>hard link
    4>both 1 and 2
    ANSWER>4
  30. __ is the command to append into the contents of a file
    1>cat > filename 2>cat >> filename
    3>cat < filename 4>cat >>> filename
    ANSWER>2
  31. State TRUE/FALSE
    Using ‘mv’ command can we rename a file
    1>TRUE
    2>FALSE
    ANSWER>1
  32. Which option of “mkdir” command allows you to create sub-directories in one single statement
    1>w
    2>-w
    3>p
    4>-p
    5>None of the above
    ANSWER>4
  33. Which of these expressions shows the proper way to add the directory /usr/bin to your path?
    1>PATH+=/usr/bin
    2>PATH=/usr/bin
    3>$PATH:/usr/bin
    4>PATH=$PATH:/usr/bin
    ANSWER>4
  34. Which of these commands will set the permissions on file textfile to read and write for the owner, read for the
    group, and nothing for everyone else?
    1>chmod 046 textfile
    2>chmod 640 textfile
    3>chmod 310 textfile
    4>chmod rw r nil textfile
    ANSWER>2
  35. Which of the following represents an absolute path?
    1>../home/abc.txt
    2>bin/cat
    3>abcd/
    4>/usr/bin/cat
    ANSWER>4
  36. Which of the following pieces of information is not contained in the passwd file?
    1>A user’s unencrypted password
    2>A user’s login name
    3>A user’s preferred shell program
    4>A user’s group ID
    ANSWER>1
  37. Which are the different ways knowing more about the command
    1>man
    2>help 3>information
    4>All of the above
    ANSWER>1
  38. State TRUE/FALSE: When you log in, the current directory is set to home directory.
    1>TRUE
    2>FALSE
    ANSWER>1
  39. When do we use the command, ps –e
    1>List full process showing the PPID
    2>Display All processes including user and system processes
    3>Dipslay Processes of User
    4>Displaying all Users processes.
    ANSWER>2
  40. What would happen when a user executes the following command and enters the details as shown below?
    a) $ cat < test1
    1>The cat command will take each line of the file test1 as input and display it on VDU.
    2>The cat command will take each line of the file test1 as Output and display it on VDU.
    3>None of the above
    ANSWER>1

DotNEt 1

a.
b.
c.
d.
e.

  1. C# keyword —- goto
  2. which operator can overload — (==)
  3. top .net class frm where everything is drived— system.obj
  4. using custom collection—– CollectionBase
  5. view proj and files —— Solution Explorer
  6. Modify prop & control —- Properties Window
  7. .Net collection class—- Hash Table
  8. “using” directive —- referencing namespace
  9. behave differently (defination of polymorphism) ——– polymorphism
  10. function of CLR — Compilation of MSIL code into native executable code
  11. true when the initial value of x is 5 —- If y = –x then x=4
  12. true about overriding —- All of the above
  13. true statement——-The relationship between a class and its base class is an example of an “is-a”
    relationship
  14. statements is true–A constructor can invoke the constructor of the direct base class
  15. Which of the following statements is true? (Select the best option)
    Constructors are not inherited
    Constructors can be overloaded
    Constructors must not have a return type
    The constructor name must match the name of the class
    All of the above
    ans —- all of the above
  16. Which class is inherited by all other classes–Object
  17. Arithmetic exception——- System.ArithmeticException 18. throw err when attempt to index an array via an index that is less than zero or outside bounds of the
    array—– System.IndexOutOfRange
  18. used to read and write encoded string—- Binary reader and Binary
  19. true about handling exceptions(frm knowledge-check-3) —– all the above
  20. valid declarations of a string——– string s1 = “strings rule”;
  21. legal array declaration in C#(frm knowledge-check-3) —– all the above
  22. manipulate large strings—- string builder
    24.type of abstraction—– data abstraction
  23. derived from existing class — inheritance
  24. exception handling—- all the above
  25. pgm o/p is —- 10 ,20, 10, 50 (all the above)
  26. pgm —– line 13: method two 50
  27. system.obj
  28. check in check out— visualsource safe—- all the above
  29. tag navigator—- all the above
  30. implement interface using “:”

DotNET 2

  1. Disconnected mode – SqlDatsAdapter
  2. Overloading – ALL
  3. Architecture – A Comprehensive….
  4. savng accnt – after line 7
  5. no of Rows affected — @@Rowaccount
  6. Stored procedure – SqlParameters
  7. One Instance – Singleton Pattern
  8. Database Design – Online Transctn Procsng Systm
  9. Return eror condtn – SqlException
  10. Drawback of Design Pattern – do not lead to direct code reuse
  11. ‘PETER’ – SELECT * FROM Persom WHERE Firstname = ‘PETER”
  12. Myselect Query — ……..(mySelectQuery, myConnection, myTrans)
  13. c=x/y — will not compile……..
  14. % n _ — ESCAPE Identifier
  15. SqlDataReader in ADO.NET — ALL
  16. Parent-Child —- ALL
  17. Stub — know the contract design
    18.
    —- the current date time
  18. two modeling elements — Dependency
  19. conn string format 4 connctng a sql server database — SqlConnection conn = new
    SqlConnection(“Data Source = DatabaseServer; Initial Catalog=Northwind;User ID
    = YourUserID ; Password =YourPassword”);
  20. inserted identity value — @@Identity
  21. builds XML reader object – ExternalXmlReader
  22. Behaves diff — POLYMORPHISM
  23. Design Phase – 1,2 n 3
  24. stored procedure 2 access data — set d comm. Type………storedProcedure
  25. class defer — factory
  26. INSERT , DELETE , UPDATE — ExecuteNonQuery 28.
    —- Class A Class B
    29.
    —– Clustered Index
  27. wildcard searches of valid search string value — LIKE
  28. WHERE….on a fixed list of values —- IN
  29. reterive single value — ExecuteScaler
  30. constructor — It is a method that is invoked……..
  31. WHERE …. Based on a range of VALUE —- BETWEEN …. AND….
  32. PHONE— 626 362 2222
  33. —– ORDER BY Salary DESC, job_id ASC
  34. OR…AND – TRUE
  35. Database Design —– a,c
  36. —— SELECT * FROM emptable WHERE Lastname = ‘Quimby’
  37. Unicode – nchar
  38. What is the output of the following Command
    $ls -R | wc – lw
    1>The output of ls command is stored in SampleFile
    2>The output of wc command is stored in SampleFile
    3>The output of ls is treated as input to wc and the count is stored in SampleFile
    4>The output of ls is treated as input to wc and the count is displayed and stored in SampleFile
    ANSWER>3
  39. What is the output of the following command
    $ cat File1>File2>File3
    1>Copies the contents from File1 to File2 and File3
    2>It is a wrong command – gives error
    3>Copies File1 contents to File3
    4>Copies File1 to File3 and creates an empty file File2
    5>None of them
    ANSWER>4
  40. What is the command to Print the searched pattern with the line numbers in File1
    1>$grep -N “Accenture” File1
    2>$grep -nv “Accenture” File1
    3>$grep -n File1
    4>$grep -n “Accenture” File1
    5>All are correct
    6>None
    ANSWER>4
  41. What is the output of the following command
    $rmdir dir1 dir1/dir2/dir3 1>deletes dir1 and dir3 directories
    2>deletes dir1 directory
    3>deletes dir1 dir2 and dir3 directories
    4>error
    ANSWER>4
  42. In the vi editor to delete a char
    1>h
    2>j
    3>x
    4>k
    5>l
    ANSWER>3
  43. To save a file without quitting the vi editor is done using the command
    1>:q
    2>:w
    3>:w!
    4>:wq
    5>:q!
    ANSWER>2
  44. What is the output the following command
    % sort -t “|” +3 -5 Students
    1>The records will be sorted based on 4th to 5th columns
    2>The records will be sorted based on 3rd and 5th columns
    3>The records will be sorted based on 3rd to 5th columns
    4>The records will be sorted based on 3rd to 4th columns
    ANSWER>1
  45. Unix file system has which of the following file structure
    1>Tree Structure
    2>Standard Structure
    3>Hierarchical Structure
    4>None of the above
    ANSWER>3
  46. In unix grep-n command displays the
    1>Line matching the pattern along with its line number
    2>Only a count of the line that match a pattern
    3>Prints out all those lines that do not match the pattern 4>None of the above
    ANSWER>1
  47. Which of the following represents an absolute path?
    1>../home/abc.txt
    2>bin/cat
    3>abcd/
    4>/usr/bin/cat
    ANSWER>4
  48. Kernel Manage
    1>Entire resources of the system
    2>Schedules the work done by the CPU
    3>Enforces the security scheme
    4>a & b
    5>b & c
    6>a b & c
    ANSWER>6
  49. Which option of grep displays the count of lines matching the pattern
    1>-c
    2>-nc
    3>-v
    4>-lc
    5>-ln
    ANSWER>1
  50. You have a file with numerical data in it (i.e file with list of numbers in it). To sort this data which
    command/method you will prefer most. Assume that list is reasonably small and Quick output is high
    priority.
    1>sort
    2>sort –n
    3>Write a C/C++ program. Use quick sort.
    4>Write a C++ program. Use STL sort algorithm
    ANSWER>2
  51. You can always return to your home directory by using the command
    1>cd /
    2>cd \
    3>cd HOME
    4>cd ..
    5>cd
    ANSWER>5
  52. You are currently placed in “trng” directory placed under the directory “training”. The command to move the file “file1” from “trng” directory to “data” directory placed under the directory “training” is:
    1>mv file1 data
    2>mv file1 data/.
    3>mv file1 ../data/.
    4>mv ../file1 ../data/.
    5>mv file1 /data/.
    ANSWER>3
  53. You are currently placed in “data” directory placed under the directory “training”. The command to
    copy the file “file1” from “data” directory to “trng” directory placed under the directory “training” is:
    1>cp file1 ../trng/.
    2>cp file1 /trng/.
    3>cp ../file1 ../trng/.
    4>cp file1 /trng/.
    5>cp file1 trng/.
    ANSWER>1
  54. who | wc –l
    What is the output of the following command if 10 users are connected?
    1>It will display the list of all the users connected.
    2>It will display an error in the command
    3>10
    4>None of the above
    ANSWER>3
  55. Which unix command gives the number of lines , words and characters.
    1>cat
    2>ls
    3>wc
    4>grep filename
    ANSWER>3
  56. Which option of sort allows you to sort data in descending order
    1>-r
    2>-o
    3>-f
    4>None of the above
    ANSWER>1
  57. Which option of ls will allow you to display the files in reverse order
    1>r
    2>-r
    3>R
    4>-RNone of the above
    ANSWER>2 21. What command do you use to copy files from all sub directories to another directory
    1>$cp -r Dir1 Dir2
    2>$cp -i Dir1 Dir2
    3>$cp -a Dir1 Dir2
    4>$cp -m Dir1 Dir2
    ANSWER>1
  58. The command used to slice the files horizontally is
    1>cut
    2>paste
    3>head
    4>cat
    ANSWER>3
  59. In the following command
    $paste -d “;:” Student1 Student2
    1>-d stands for define
    2>-d stands for difference
    3>-d stands for delimeter
    4>None
    ANSWER>3
  60. Which of the following commands will display the names of hidden files ?
    1>ls –h
    2>ls –a
    3>ls –l
    4>ls –x
    5>ls –p
    ANSWER>2
  61. Which of the following commands will display the details of directories only of the current directory
    ?
    1>ls –d
    2>ls -l | grep “d$”
    3>ls -l | grep “^d”
    4>ls -l | grep “d^”
    5>ls -l | grep “$d”
    ANSWER>3
  62. Which character must be specified at the end of the command in order to execute that command in
    the background ?
    1>&
    2>^
    3>%
    4>$ 5>#
    ANSWER>1
  63. If there are 5 files in the current directory and if ls -l | wc -l command is given in the current
    directory, then the output of this command will be
    1>5
    2>all the filenames will be displayed
    3>6
    4>all the lines of all the 5 files.
    5>syntax error will be displayed
    ANSWER>3
  64. Which of the following escape sequences can be used to keep the cursor on the same line after
    displaying the output with echo command ?
    1>\a
    2>\b
    3>\c
    4>\k
    5>None of the above
    ANSWER>3
  65. ln -s will create —– link to the file
    1>soft link
    2>symbolic link
    3>hard link
    4>both 1 and 2
    ANSWER>4
  66. __ is the command to append into the contents of a file
    1>cat > filename
    2>cat >> filename
    3>cat < filename 4>cat >>> filename
    ANSWER>2
  67. State TRUE/FALSE
    Using ‘mv’ command can we rename a file
    1>TRUE
    2>FALSE
    ANSWER>1
  68. Which option of “mkdir” command allows you to create sub-directories in one single statement
    1>w
    2>-w
    3>p
    4>-p 5>None of the above
    ANSWER>4
  69. Which of these expressions shows the proper way to add the directory /usr/bin to your path?
    1>PATH+=/usr/bin
    2>PATH=/usr/bin
    3>$PATH:/usr/bin
    4>PATH=$PATH:/usr/bin
    ANSWER>4
  70. Which of these commands will set the permissions on file textfile to read and write for the owner,
    read for the group, and nothing for everyone else?
    1>chmod 046 textfile
    2>chmod 640 textfile
    3>chmod 310 textfile
    4>chmod rw r nil textfile
    ANSWER>2
  71. Which of the following represents an absolute path?
    1>../home/abc.txt
    2>bin/cat
    3>abcd/
    4>/usr/bin/cat
    ANSWER>4
  72. Which of the following pieces of information is not contained in the passwd file?
    1>A user’s unencrypted password
    2>A user’s login name
    3>A user’s preferred shell program
    4>A user’s group ID
    ANSWER>1
  73. Which are the different ways knowing more about the command
    1>man
    2>help
    3>information
    4>All of the above
    ANSWER>1
  74. State TRUE/FALSE: When you log in, the current directory is set to home directory.
    1>TRUE
    2>FALSE
    ANSWER>1
  75. When do we use the command, ps –e
    1>List full process showing the PPID 2>Display All processes including user and system processes
    3>Dipslay Processes of User
    4>Displaying all Users processes.
    ANSWER>2
  76. What would happen when a user executes the following command and enters the details as shown
    below?
    a) $ cat < test1
    1>The cat command will take each line of the file test1 as input and display it on VDU.
    2>The cat command will take each line of the file test1 as Output and display it on VDU.
    3>None of the above
    ANSWER>1

1.String s1=”abc”;
String s2=”abc”;
String s3=new String(s1)
Which of the following will give the result true?
Ans:
S1.equals(s2);
S1.equals(s3);

2.can the inner class private members access the outer class?
Ans: true
Doubtful

  1. greater of 3 nos a=10, b=10, c=10?
    Ans c

4 . switch case value of ch2
Ans ch2=’4’.

  1. keywords study all
    Ans strictfp, constant, do, instanceof, implements
    6

planets array questions t

String pla[]={“mon”,”tue”,”dhfjd”,”dfdfd”};

For(i=0;i_;i++) Fill the blank.

ans Length

  1. How many method r there in mouseListener
    Ans: 5
    8.What r the methods of mouseMotionListener
    Ans: mouseMoved ,mouseDragged
  2. which of these is correct declaration
    ans import java.util.vector
  3. find the correct one
    ans class employee(String nam;Int num;String empname; }
  4. array initilisation choose not correct one
    options
    1.
    2.
    3.
    4.

int a[][]=new int[4][4];
int [] a []=new int [4] [4];
int a[] []=new int [4][];
int [] a [] =new int [][4];

ans :: 4

  1. a=6
    b=7
    x= a++ + b++
    System.out.println(“The value is=”+x+a+b);
    Ans: x=13 , a= 7 , b=8;

Ans

  1. which mtd is used to test whether thread is active or not?
    isalive
  2. if thread exists or not (is thread is running or not)

ans

is alive.

  1. to call paint mtd of applet ans

repaint

  1. wait can be called in non-synchronised block

ans

false.

  1. to run threads sequentially?

Ans.

Synchronize.

17 .

to set color of panel?
p.setBackground(color);

  1. extension of awt frame is similar to

ans. JFrame.

  1. can overloaded mtds hav diff access specifier?
    Ans.

Yes , true.

  1. for Creating frame in main method which of the following is used
  2. Abstract
  3. static
  4. final
  5. no modification are required
    ans: 4
  6. int values[]={1,2,3,4,1,2,3};
    try
    {
    for(i=values.length-1;i>=0;i++)
    {
    Syetm.out.println(values[i]);
    }
    }
    Catch(Exception e)
    {System.out.println(“2”);}
    Finally
    {system.out.pritnln(“3”);}
    Ans:: 1 2 3 21. method of keyListener
    ans:keyPressed , keyReleased , keyTyped i.e 3 methods
  7. choose corredt identifiers
    checkbox
  8. $int
  9. big01LongStringdgdcfhgvjfsdhg
  10. 1
  11. finalist
    5.
    ans : 1 2 4 5
    23String s1=”Java”;
    String s2=”java”;
    // comment here
    System.out.println(“Equal”);
    Else
    System.out.println(Not equal);

Ans:s1.equalIgnoreCase(s2);

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

Knowledge Check 3 Solutions
Note: When grading, each question is worth 3.12 points (%) for a total of 100 (%).
1)

What is the .NET collection class that allows an element to be accessed using a
unique key?
a. ArrayList
b. HashTable
c. StringCollection
d. None of the above

Explanation for Faculty:
A is incorrect. ArrayList does not use unique key to access its elements.
B is the correct answer. HashTable is the collection class in which the elements can be
accessed using a unique key.
C is incorrect. StringCollection does not use a unique key. One way of accessing elements in
a StringCollection is by the use of the IEnumerator.

2)

What is the top .NET class from which everything is derived?
a. System.Collections
b. System.Globalization
c. System.Object
d. System.IO

3)

Which of the following commands is suitable to use when manipulating many
strings (e.g., append / insert / delete)?
(Select the best option)
a. System.String
b. Char Array
c. Struct
d. StringBuilder
e. All of the above

Explanation for Faculty:
StringBuilder is best suited for this purpose as it does not create a new string every time the
value of the string is modified. System.String creates a new string whenever the value is
modified.

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 1 of 24

Application Delivery Fundamentals (ADF): MS .NET

4)

Knowledge Check 3 Solutions

What namespace contains classes that can be used to define culture-related
information?
a. System.Globalization
b. System.Localization
c. A custom namespace with custom functions written to handle localization.
d. None as it is available by default.

Explanation for Faculty:
System.Globalization class contains the required methods and/or properties necessary to
create a localized application. There is no namespace called System.Localization. These
methods are not available by default – the System.Globalization needs to be imported
explicitly.

5)

Which of the following should be inherited from when writing Custom Collections?
a. ICollection
b. CollectionBase
c. Both a and b.
d. Write your own base class and inherit from it.

Explanation for Faculty:
All custom collection classes should inherit from CollectionBase. ICollection is an interface
which is used by most of the collection classes.

6)

Under what permissions do delegates run?
a. Caller’s permission
b. Declarer’s permission
c. The most strict permission available
d. The least strict permission available
e. It does not require any permission to run.

7)

Which of the following statements are true?
a. XML serialization serializes only the public fields and property values of an
object.
b. XML serialization results in strongly-typed classes with public properties and
fields that are converted to a serial format for storage or transport.
c. XML serialization converts all methods, private fields, or read-only
properties (irrespective of their access modifier).
d. Both a and b.
e. None of the above.

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 2 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

Explanation for Faculty:
A) and B) are both correct. XML Serialization can be used to serialize only the public fields
and properties. To serialize all an object’s fields and properties, both public and private, use
the BinaryFormatter instead of XML serialization. Also, XML Serialization does not include any
type information.

8)

The class that encapsulates the event information should be derived from:
a. System.EventArgs
b. System.EventHandler
c. System.Delegate
d. System.ComponentModel.EventDescriptor
e. None of the above

Explanation for Faculty:
The class that encapsulates the event information should be derived from EventArgs.
System.EventHandler represents the method that will handle the event that has no event data.
The Delegate class is the base class for delegate types. ComponentModel.EventDescriptor
class provides information about an event.

9)

Which of the following statements are true?
a. A delegate can reference a method only if the signature of the method
exactly matches the signature specified by the delegate type.
b. A delegate can reference a method as long as the return type matches the
return type specified by the delegate type. There is no need for the
parameters to match.
c. A delegate can reference a method as long as the parameters and their
data types match those specified by the delegate type. There is no need for
the return type to be the same.
d. Both b and c.
e. All of the above.

10) Which of the following classes are used to read and write encoded strings and
primitive datatypes from and to streams?
a. StreamReader and StreamWriter
b. BinaryReader and BinaryWriter
c. StringReader and StringWriter
d. TextReader and TextWriter
Explanation for Faculty:

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 3 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

BinaryReader and BinaryWriter are used to read and write encoded strings and primitive
datatypes from and to streams. StreamReader and StreamWriter are used to read and write
characters from and to streams. TextReader and TextWriter are the abstract base classes.

11) For which of the following can generic types be used?
(Select the best option)
a. To maximize code reuse, type safety and performance
b. To create collection classes
c. To create your own generic interfaces, classes, methods, events, and
delegates
d. All of the above
12) Which of the following about iterators is true?
(Select the best option)
a. They are a method, get accessor, or operator that supports foreach iteration
in a class or struct.
b. They are used in collection classes.
c. Using an iterator allows us to traverse a data structure without having to
implement the IEnumerable interface.
d. All of the above.
e. Both a and c.
13) Which of the following about partial types is true?
(Select the best option)
a. Allows us to split the definition and implementation of a method in a class
across multiple files.
b. Allows us to split the definition and implementation of a class across
multiple files.
c. Allows us to split the method definition in one file and implementation in
another file.
d. All of the above.
14) Which of the following is true concerning a static class?
a. A static class allows adding non-static members.
b. One can create instances of the static class.
c. The keyword ‘static’ is used when defining a static class.
d. One can create a derived class from a static class.
e. All of the above.
Explanation for Faculty:
Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 4 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

A static class does not allow adding of non static members. We cannot create an instance of a
static class. A static class cannot be derived.

15) What is the visibility qualifier used for?
(Select the best option)
a. Specifying different visibility for the get and set accessors of a
property or an indexer.
b. Setting the visibility of the accessor get and set to public even though the
property visibility is set to protected.
c. Setting the visibility of the accessor and set to public even though the
property visibility is set to internal.
d. All of the above.
16) Which of the following is true about nullable types?
(Select the best option)
a. A Value type variable can be assigned the value of null.
b. HasValue and Value properties are used to test for null and to retrieve the
value of a Nullable type.
c. The System.Nullable.GetData property is used to return the assigned value.
d. Both a and c.
e. Both a and b.
f. All of the above.
Explanation for Faculty:
Nullable Types are value type variable that can be assigned the value of null. The HasValue
and Value property is used to test for null and to retrieve value of a Nullable type. The
System.Nullable.GetValueorDefault property is used to return the assigned value or the
default value for the underlying type.

17) What are delegate inferences used for?
(Select the best option)
a. To declare a delegate object
b. To wrap a method to a delegate object
c. To make a direct assignment of a method name to a delegate variable
without wrapping it first with a delegate object
d. Both a and c
e. All of the above

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 5 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

18) Which of the following is true about generic types?
(Select the best option)
a. System.Collections.Generic namespace in the .NET class library contains
the generic collection classes.
b. You can create your own generic interfaces, classes, methods, events, and
delegates.
c. Reflection can be used to understand the information on the types used in a
generic datatype.
d. All of the above.
19) Which of the following is used as the global namespace qualifier?
a. ::global
b. global::
c. global:
d. None of the above
20) Which of the following is a rule for an abstract class?
a. An abstract class can be instantiated.
b. A class having abstract methods may not be an abstract class.
c. A class that has more than one abstract method, whether declared or
inherited from an abstract class, may be declared abstract.
d. When you use an abstract modifier on a static property it will result in
an error.
Explanation for Faculty:
(a) An abstract class cannot be instantiated. (b) A class with at least one abstract method
must be declared as an abstract class. (c) A class that has at least one abstract method,
whether declared or inherited from an abstract class, must be declared abstract. (d) You may
not use the abstract modifier on a static property as this will result in an error.

21) Which of the following is a rule for an interface?
a. All interface members implicitly have private access.
b. An object of a class can be casted to the interface which it
implements.
c. A class implementing an interface may or may not contain all the
implementations of the members declared in the interface.
d. The interface provides implementations for its members.
Explanation for Faculty:

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 6 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

(a) All interface members implicitly have public access. (b) Correct. The rule for an Interface is
that an object of a class can be casted to the interface which it implements. (c) A class
implementing an interface must implement all the members declared within the interface. (d)
The interface itself does not provide implementations for the members that it defines.

22) Which of the following statements about the overloadability of operators are true?
(Select the best option)
a. Binary operators can be overloaded.
b. The cast operator cannot be overloaded, but you can define new conversion
operators.
c. Unary operators can be overloaded.
d. All of the above.

23) Which of the following is true about static constructors?
(Select the best option)
a. Only static classes have static constructors.
b. A class can have parameterized static constructors.
c. Static constructors get executed when static members of a class are
accessed for the first time or when an object of the class is created.
d. Static variables get instantiated when a static constructor gets called.
Explanation for Faculty:
(a) All classes have static constructors. (b) Static constructor doesn’t have parameters and
access modifiers cannot be applied to it. (c) Correct. Static constructor gets executed when
static members of a class are accessed for the first time or when an object of the class is
created. (d) Static variables get instantiated before the static constructor.

24) Which of the following is true about threading in .NET?
a. Threading is implemented using the classes under the namespaces
System.ThreadStart and System.ThreadPool.
b. ThreadStart delegate is used for long running tasks while ThreadPool
is used for short running tasks.
c. Multiple threads within a process cannot share common data amongst
them.
d. Multiple processes share common data between them.
e. Both a and b.
Explanation for Faculty:
(a) Classes under System.Threading help implementation of threading in .NET. (b) Correct.
ThreadStart delegate is used for long running tasks while ThreadPool is used for short running
Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 7 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

tasks. (c) Multiple threads within a process can share common data amongst them. (d)
Multiple processes cannot share common resources.

25) Identify the correct statement pertaining to delegates.
a. Delegates are type-safe function pointers where any method can be called
through the delegate.
b. Async delegate calls can be made using the BeginInvoke() and
EndInvoke() methods of a delegate.
c. Multiple methods attached to a delegate get executed in an asynchronous
manner when the delegate is called.
d. An event-like pattern can be implemented using events only.
Explanation for Faculty:
(a) To call a method through a delegate, the signature of the delegate and the method must
match. (b) Correct. Async delegate calls can be made using the BeginInvoke() and
EndInvoke() methods of a delegate. (c) Multiple methods attached to a delegate gets
executed synchronously in the order in which they got attached. (d) Delegates and events
work hand-in-hand to produce event-like pattern.

26) Identify the ways through which threads can be implemented.
a. By directly or indirectly using the ThreadPool class
b. By using the ThreadStart delegate
c. By the BeginInvoke() method of delegate
d. By the BeginInvoke() method of Stream
e. a, b, and c
f. a, b, and d
Explanation for Faculty:
Threads can be implemented by directly or indirectly using the ThreadPool class, by using the
ThreadStart delegate, and by the BeginInvoke() method of delegate. (d) By the BeginRead()
method of Stream.

27) Predict the outcome of the following program.
namespace TestThreading
{
class Program
{
static void Main()
{
ThreadStart task1 = new ThreadStart(ProcessTask1);
Thread t1 = new Thread(task1);
Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 8 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

t1.Start();
Console.ReadLine();
}
static void ProcessTask1()
{
for (int i = 0; i < 3; i++)
{
Console.WriteLine(“Thread t1 in action”);
Thread.Sleep(5);
}
}
a. Thread t1 in action
Thread t1 in action
Thread t1 in action
b. Error in the program
c. Thread t1 in action
d. None of the above
28) Are the following statements true or false?
Statement1: Join() method – This method blocks the calling thread until the thread
terminates.
Statement2: Sleep() method – This method blocks the thread for a specific
amount of time.
a. Both statements are true.
b. Both statements are false.
c. Statement1 is false and statement2 is true.
d. Statement2 is false and statement1 is true.
29) Are the following statements true or false?
Statement1: Lowest priority – The thread with this priority can be scheduled after
threads with any other priority.
Statement2: Highest priority – The thread with this priority can be scheduled
before threads with any other priority.
a. Both statements are true.
b. Both statements are false.
c. Statement1 is false and statement2 is true.
d. Statement2 is false and statement1 is true.

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 9 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

30) Are the following statements true or false?
Statement1: Which gives us the capabilities to assess our own custom methods
to data types without deriving from the base class.
Statement2: Allows you to pass in named values for each of the public properties
that will be used to initialize the object.
a. Both statements are true.
b. Both statements are false.
c. Statement1 is false and statement2 is true.
d. Statement2 is false and statement1 is true.

31) Each XML document has exactly one , also known as the document
element.
a. XML declaration
b. root element
c. closing
d. attribute
e. opening
32) ___
are information not part of the data the element holds.
a. XML declarations
b. Root elements
c. Openings
d. Closings
e. Attributes

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 10 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

Knowledge Check 1 Solutions
Note: When grading, each question is worth 5.55 points for a total of 100.
33) The ______________is a comprehensive, object-oriented collection of reusable
types.
a. Class Library
b. Console Application
c. None of the Above
34) In the .NET Framework, where is the version information of an assembly stored?
a. Version Controller
b. Manifest
c. Visual Source Safe
d. Common Type System
35) What tool is used to manage the assemblies in the Global Assembly Cache?
a. gacutil.exe
b. gassy.exe
c. gacmgr.exe
d. al.exe
36) Which of the following languages is not a managed code in the .NET Framework?
a. C#
b. VC++
c. C
d. VJ#
e. VB
f. None of the above
37) Which of the following does an assembly contain?
a. Manifest, Type metadata, Resources, MSIL code
b. Manifest, Type metadata
c. Manifest, Type metadata, Resources
d. Manifest
38) What are the different types of comments that can be implemented in C#.NET?
a. Single-line comment, multi-line comment, documentation comment
b. Single-line comment, multi-line comment
Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 11 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

c. Multi-line comment, documentation comment
d. None of the above
39) Identify the contextual keywords for the options below.
a. From, ascending, where, select
b. DoWhile, while, for
c. Switch, goto
d. public, private
40) Which of the following statements about boxing is true?
a. It is a datatype conversion technique that is used to convert a value type
to an object type or a reference type.
b. It is a datatype conversion technique that is used to convert a reference type
to a value type.
c. It is a datatype conversion technique that is used to convert a value type to a
value type.
d. None of the above.
41) Which of the following displays icons in a hierarchical treeview, where each icon
represents a different type of symbol; such as namespace, class, and function?
a. Solution Explorer
b. Treeview
c. Properties Window
d. Add Reference
42) Identify the output for the program below. What will the program print?
Class ExampleDemo
{
Public static void Main(string [] args)
{
Console.Writeline(“River of \ndreams”);
}
}
a. River of dreams
b. River of
dreams
c. dreams
d. River of \ndreams

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 12 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

43) Analyze the following code and identify what will happen when the code runs.
Class Arithmetic
{
Public static void AddNum(int number1,int number2)
{
Try
{
Int result=number1/number2;
Console.WriteLine(result);
}
Catch(DivideByZeroException e)
{
Console.WriteLine(“Exception : {0}”,e);
}
}
Public static void Main ()
{
Arithmetic.AddNum(100,0);
Console.ReadLine();
}
}
a. Syntax error
b. Logical error
c. Runtime error
d. No error
44) Predict the output of the following code.
Using System;
Class ExampleCode
{
Public static void Main()
{
Char var=’A’;
Console.WriteLine(A+1);
Console.ReadLine();
}
}
a. 66
b. A
c. A1
d. Compilation error

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 13 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

45) Analyze the following code then answer the question that follows.
1 class Test
2 {
3
void MethodOne( )
4
{
5
int x = 10;
6
MethodTwo (x);
7
System.Console.WriteLine(“\nMethodOne “+ x);
8
x = 20;
9
System.Console.WriteLine(“\nMethodOne “+ x);
10
}
11 void MethodTwo (int x)
12 {
13
System.Console.WriteLine(“\nMethodTwo “+ x);
14
x = 50;
15
System.Console.WriteLine(“\nMethodTwo “+ x);
16 }
17
public static void Main(string[] args)
18
{
19
Test b = new Test();
20
b.MethodOne();
21
}
22 }
Which of the following output is correct when the C# program above is executed?
(Select the best option)
a. MethodTwo 10
MethodTwo 50
MethodOne 10
MethodOne 20
b. MethodTwo 10
MethodOne 10
MethodTwo 50
MethodOne 20
c. MethodTwo 10
MethodOne 10
MethodTwo 50
MethodTwo 50
d. Error in the program

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 14 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

46) Which of the following will legally declare a construct and initialize an array?
(Select the best option)
a. char myList[] = [‘a’, ‘b’, ‘c’];
b. char myList[] = {a ; b; c; };
c. char [ ] myList = {‘a’, ‘b’, ‘c’};
d. char myList [] = {‘a’; ‘b’; ‘c’};
47) What are the contents of an Assembly?
a. Type metadata
b. MSIL
c. Set of resources
d. Assembly manifest
e. All of the above
48) From which of the following menu lists in Visual Studio are controls dragged and
dropped into the Designer window?
a. ToolBox
b. Solution Explorer
c. ControlBox
d. TaskList
49) Which of the following options is used for debugging when there is no need to
examine a nested method call?
a. Step out
b. Step over
c. Step into
d. None of the above
50) Predict the output of the following code.
Using System;
Class ExampleCode
{
Public static void Main()
{
Char var=’A’;
Console.WriteLine(var+1+10);
Console.ReadLine();
}
}
a. 76
Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 15 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

b. A
c. A1
d. Compilation error

Knowledge Check 2 Solutions
Note: When grading, each question is worth 5.55 points (%) for a total of 100 (%).

51) What happens during OOP?
a. Programs are based on the concept of procedure call.
b. Objects communicate and interact with each other using messages.
c. Programs are organized in a fashion similar to how we organize things in our
everyday lives.
d. None of the above.
52) Match the concepts listed on the right with their correct descriptions.
C

B
D
A

1) The ability to hide the internal
implementation details of an object from its
external view.
2) The ability to create new classes based on
existing classes.
3) An object’s ability behaves differently
depending on its type.
4) A self contained entity with attributes and
behavior.

a) Object

b) Inheritance
c) Encapsulation
d) Polymorphism

Explanation for Faculty:
1) Encapsulation makes the implementation of an algorithm hidden from its client.
2) Inheritance allows you to create a class that inherits the state and behaviors of its
baseclass, thus creating new classes based on existing classes in the hierarchy.
3) Polymorphism is generally the ability to appear in many forms. In object-oriented
programming, more specifically, it is the ability to redefine methods for derived classes.
4) An object is a self-contained entity with attributes and behaviors.

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 16 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

53) Which of the following is true about a constructor? (Select the best option)
a. A constructor is a method that is invoked automatically when a new
instance of a class is created.
b. Constructors do not initialize the variables of the newly created object.
c. Constructors are used to remove objects from memory.
d. The constructor method should have a different name than the class name.
e. None of the above.
Explanation for Faculty:
A) Correct. A constructor method is invoked automatically when a new instance of a class is
created.
B) Incorrect. This statement is false because constructors DO initialize the variables of a
newly created object. Whenever an object is instantiated, you should always call the
constructor of that class. Constructors are the last to be called by the CLR to check if any
uninitialized variables are inside the class (but outside any constructor), were set inside the
constructors.
C) Incorrect. This statement is false because constructors do not remove objects from
memory. In C#, there is an automatic memory cleaning mechanism, which is done by the
Garbage Collector.

54) Which of the following is true about overloading? (Select the best option)
a. Overloaded methods must change the argument list.
b. Overloaded methods can change the return type.
c. Overloaded methods can change the access modifier.
d. All of the above.
Explanation for Faculty:
A is a true statement. Method signature is defined by the method name and argument list.
Overloaded methods are unique methods with the same name; therefore, the argument list
must change.
B and C are also true statements because overloaded methods do not really care about the
return type and access modifiers. They may or may not change their return types and
modifiers

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 17 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

55) Which of the following is true about overriding? (Select the best option)
a. Overridden methods must exactly match the argument list.
b. Overridden methods must exactly match the return type.
c. The access level of overridden methods cannot be more restrictive.
d. You cannot override a method marked sealed.
e. All of the above.
Explanation for Faculty:
A and B are true statements because overriding methods must have exactly the same method
name, argument lists and return types.
D is a true statement because sealed methods cannot be overridden. Note the implication of
‘sealed’ keyword, sealed classes cannot be extended or inherited.

56) Which of the following is true about the parent-child assignment in inheritance?
(Select the best option)
a. child ≠ parent;
b. parent = child;
c. parent = (child) child;
d. child = (child) parent;
e. All of the above
Explanation for Faculty:
A is a true statement. Child = parent is casting down the inheritance hierarchy, which is
forbidden in C#. This results in a compiler error.
B is a true statement because Child inherits from Parent so Child is implicitly casted to type
Parent.
C is a true statement. Although implicitly casted as in B, it could also be explicitly casted this
way.
D is a true statement. Parent was forced to be casted to type Child. This will compile legally
but at runtime, this statement will yield InvalidCastException.

57) Which of the following is true about polymorphism? (Select the best option)
a. Polymorphism refers to an object’s ability to behave similarly regardless of its
type.
b. Overloading is the process of reusing a method name but attached to a
different signature in the same class.
c. Overriding is the process of reusing a method name but attached to a different
signature in the subclass class.
Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 18 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

d. All of the above.
e. None of the above.
58) Which of the following is a true statement? (Select the best option)
a. The relationship between a class and its base class is an example of a “has-a”
relationship.
b. The relationship between a class and its base class is an example of an
“is-a” relationship.
c. The relationship between a class and an object referenced by a field within the
class is an example of a “is-a” relationship.
d. None of the above.
59) Which of the following statements is true? (Select the best option)
a. A constructor can invoke another constructor of the same class.
b. A constructor cannot invoke itself.
c. A constructor can invoke the constructor of the direct base class.
d. All of the above.
e. None of the above.
Explanation for Faculty:
A is a true statement. Constructors can be overloaded but not overridden. To invoke another
constructor of the same class, the keyword ‘this()’ is used.
C is a true statement. A constructor can invoke the constructor of the direct base class using
“base()”.

60)

Which of the following statements is true? (Select the best option)
a. Constructors are not inherited.
b. Constructors can be overloaded.
c. Constructors must not have a return type.
d. The constructor name must match the name of the class.
e. All of the above.

61) Which class is inherited by all other classes? (Select the best option)
a. Object
b. Exception
c. System
d. Threading

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 19 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

62) Given the following code, which of the following output is correct?
1 class ClassA
2 {
3
public ClassA()
4
{
5
System.Console.Write(“ClassA “);
6
}
7 }
8
class ClassB : ClassA
9
{
10
public ClassB()
11
{
12
System.Console.Write(“ClassB”);
13
}
14
public static void Main(string[ ]args)
15
{
16
ClassA objB = new ClassB();
17
}
18
}
a. ClassA
b. ClassA
ClassB
c. ClassB
d. None of the above
Explanation for Faculty:
By instantiating an object of type ClassB, the main method of ClassB invokes its constructor,
in which there is an implicit call to base class, thus calling the constructor of ClassA printing
“ClassA”. Then, it goes back to the calling constructor in the subclass printing “ClassB”.

63)

Which of the following is true about Multiple Inheritance?
a. C# does not support Multiple Inheritance.
b. A class can inherit multiple classes.
c. A class can inherit one class together with implementing multiple
interfaces.
d. None of the above

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 20 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

64) What is the output of the program below?
class Constructor1
{
static Constructor1()
{
Console.WriteLine(“\nStatic constructor called”);
}
public Constructor1()
{
Console.WriteLine(“\nInstance constructor called);
}
}
class Constructorexp
{
public static void Main()
{
Constructor1 c1 = new Constructor1(22);
Console.ReadLine();
}
}
}
a. Static Constructor called
Instance Constructor called
b. Instance Constructor called
Static Constructor called
c. Error in the program
d. None of the above
65)

What is the output of the program below?
class Constructor1
{
int x;
static Constructor1()
{
Console.WriteLine(“\nStatic constructor called”);
}
public Constructor1(int x1):this()

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 21 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

{
x = x1;
Console.WriteLine(“\nInstance cons :x={0}”, x);
}
private Constructor1()
{
Console.WriteLine(“\nPrivate constructor called”);
}
}
class Constructorexp
{
public static void Main()
{
Constructor1 c1 = new Constructor1(22);
Console.ReadLine();
}
}
}
a. Static Constructor called
Private constructor called
Instance Cons x=22
b. Instance Constructor called
Static Constructor called
c. Error in the program
d. None of the above

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 22 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

66) What is the output of the program below?
Class DemoClass
{
Static DemoInterface
{
Class SubDemoClass
{
}
}
}
Class Demo
{
public static void Main()
{
DemoClass.DemoInterface.SubDemoClass D1=new
DemoClass.DemoInterface.SubDemoClass();
Console.WriteLine(“Object Created”);
Console.ReadLine();
}
}
a. Prints object created
b. Compile time error
c. Runtime error
d. None of the above
67) What is the output of the program below?
Interface TestInterface
{
Int i=22;
}
Class Demo
{
Public static void Main()
{
Console.WriteLine(“Prints”+TestInterface.i);
}
}

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 23 of 24

Application Delivery Fundamentals (ADF): MS .NET

Knowledge Check 3 Solutions

a. Prints 22
b. Compile time error
c. Runtime error
d. None of the above
68) Predict the output of the program below.
Class StringDemo
{
Public static void Main()
{
String str=”AAA”;
StringBuilder stringB=new StringBuilder(s1);
Console.WriteLine(stringB.Equals(str)+”,” str.Equals(s1));
Console.ReadLine();
}
}
a. True, True
b. False, False
c. True, False
d. False, True

Course Code # Z83272/Z61156
© Accenture 2011 All Rights Reserved

Page 24 of 24

1. What are the workflow authoring styles supported by WWF
Choose two most appropriate option
a) Base class library
b) Entity Style
c) Random Style
d) Data-driven style
Answer: a,d

  1. Identify the option which follows the correct order of Action
  2. Obtain the Data source.
  3. Execute the query.
  4. Create the query
    Choose most appropriate option
    a) 1,2,3
    b) 3,2,1
    c) 1,3,2
    d) 3,1,2
    Answer: c
  5. _ is a process in which a Web application accepts data from a user and processes it
    Choose most appropriate option.
    a) Page Init
    b) Page Load
    c) ASP.NET
    d) Page Posting
    Answer: d 4. The class that encapsulates the event information should be derived from __
    Fill in the blank with an appropriate option
    a) System.EventArgs
    b) System.EventHandler
    c) System.Delegate
    d) System.componentModel.EventDescriptor
    Answer: a
  6. What are the different components of LINQ?
    Choose four appropriate options.
    a) LINQ to Objects
    b) LINQ to XML
    c) LINQ to SQL
    d) LINQ to DataSet
    e) LINQ to Datatable
    f) LINQ to DataRow
    Answer: a b c d
  7. The specific protocols and serialization formats that are used to support successful communication with
    the service
    Choose most appropriate option
    a) Operation Contract
    b) Service Contract
    c) Fault Contract
    d) Data Contract
    e) All of the above
    f) None of the above
    Answer: b 7. Consider the enumeration below enum ThreadPriority { Lowest, BelowNormal, Normal, AboveNormal,
    Highest }
    Choose two appropriate options
    a) Threadpriority becomes important only when multiple threads are simultaneously active
    b) Lowest and Highest are not part of this enumeration
    c) A thread’s Priority property determines how much execution time it gets relative to other active
    threads in the operating system
    Answer: a c
  8. In Memory mapping, which class signifies a randomly accessed view of a memory-mapped file
    Choose most appropriate option
    a) MemoryMappedViewStream
    b) MemoryMappedViewAccesser
    c) CreateViewAccessor
    d) MemoryMappedFileView
    e) None of the above
    Answer: b
  9. In WPF, which layout control aligns the child controls to the edges of panel
    Choose most appropriate option
    a) StackPanel
    b) DockPanel
    c) GridPanel
    d) CanvasPanel
    e) None of the above
    Answer: b
  10. A _ expression is an anonymous function that can contain expressions and statements and can also
    be used to create delegates or expression tree types
    Choose the appropriate option a) Join
    b) XML
    c) Data
    d) lambda
    e) SQL
    Answer: d
  11. Which of the below are invalid serialization attributes ?
    Choose two most appropriate options.
    a) XMlRootElement
    b) XmlAttribute
    c) XmlElement
    d) XmlElementName
    Answer: a d
  12. __ provides a means of reading a forward-only stream of rows from a SQL server database.
    Fill in the blank with an appropriate option
    a) SqlDataReader
    b) Dataset
    c) DataTable
    d) Dataview
    Answer: a
  13. During a Jagged Array practice session, Shruthi wrote following code:
    int[][] myarray- new int[][3];
    myarray [0]=new int[3];
    myarray [1]=new int[4];
    myarray [2]=new int[5]; IDE continued to show an error for this Jagged Array construction According to you which line is causing
    this error?
    Choose most appropriate option
    a) int[][]myarray new int[][3];
    b) myarray [0]=new int[3];
    c) myarray [1]=new int[4];
    d) myarray [2]=new int[5];
    Answer: a
  14. Consider the following code and identify the attribute to be added to make the Name a property of
    Employee type in the data contract
    [DataContract]
    Public class Employee
    {
    private string m_Name;
    public string Name { get { return m_Name;} set { m_Name = value; } }
    }
    Choose most appropriate option
    a) [DataMember]
    b) [DataService]
    c) [DataAttribute]
    d) [DataProperty]
    Answer: a
  15. Please select the two correct statements for XML document:
    Choose two appropriate options
    a) XSD is the XML-based alternative of DTDs having the same purpose of DTDs but more powerful and
    extensible b) DTD is the XML-based alternative of XMLs having the same purpose of XMLs but more powerful and
    extensible.
    c) DTD is the older standard. It is most probable that XSD will replace DTD for validating XML
    Documents.
    d) XSD is the older standard. It is most probable that DTD will replace XSD for validating XML
    Documents.
    Answer: a c
  16. Rahul is trying to use StringBuilder class in a program, but he is getting error. To use the StringBuilder
    class which namespace he should include in the program
    Choose most appropriate option
    a) System.String
    b) System.Globalization
    c) System.io
    d) System.Builder
    e) None of the above
    Answer: e
  17. please select the correct task to prevent possible code injections
    choose three appropriate options
    a) Client side validation need to be done by Java Script
    b) Don’t store sensible data into cookies
    c) Don’t use hidden boxes to hold data
    d) Don’t depend on client side javascript validation
    Answer: b c d
  18. Which of the following statement(s) is/are true about the operator overloading?
    Choose most appropriate option
    a) Binary operators can be overloaded
    b) The cast operator cannot be overloaded, but you can define new conversion operators c) Unary operators can be overloaded.
    d) All of the above
    Answer: d
  19. The goal of ____is to decrease the amount of code and maintenance required for data-oriented
    applications
    Choose the appropriate option
    a) LINQ to C#
    b) LINQ to Entities
    c) LINQ to Database
    d) LINQ to XML
    Answer: b
  20. In the .NET Framework, where is the version information of an assembly stored?
    Choose most appropriate option
    a) Manifest
    b) Visual Source Safe
    c) Common type System
    d) Version Control
    Answer: a
  21. Identify drawbacks of the Design Patterns from the below mentioned options
    Choose two appropriate answers
    a) Patterns do not lead to direct code reuse
    b) Patterns are deceptively simple
    c) Teams may not Suffer from pattern overload
    d) Maintainability and reusability
    Answer: a b 22. This event is raised by the page object. This event is used to complete all tasks that require
    initialization
    Choose the appropriate option
    a) Prelnit
    b) Preload
    c) Init
    d) Initcomplete
    e) LoadComplete
    Answer: d
  22. A class source-code file that is compiled at run time. These classes can be: HTTP Module, HTTP
    Handler. Can also be a code-behind file for an ASP.NET page or a stand-alone class file containing
    application logic- find the extension of these files above
    Choose most appropriate option
    a) .config
    b) .cs, .jsl, .vb
    c) .licx, .webinfo
    d) .resources, .resx
    Answer: b
  23. which of the following does an assembly contain ?
    Choose most appropriate option
    a) Manifest type metadata, Resources, MSILcode
    b) Manifest, type metadata
    c) Manifest, type metadata, resources
    d) Manifest
    Answer: a
  24. Which Method is used to create a MemoryMappedViewAccessor that maps to a view of the memorymapped file Choose most appropriate option
    a) MemoryMappedViewAccesser()
    b) MemoryMappedViewStream()
    c) CreateViewAccessor()
    d) CreateMemoryMappedViewAccessor()
    Answer: c
  25. Which of these namespaces handle the following information Language-Country/ Region -Calendars in
    use Format pattern for dates -Currency
    Choose most appropriate option.
    a) System.String
    b) System.Globalization
    c) System.lO
    d) System.Reflection
    Answer: b
  26. WPF Which control n the WPF application has a property GroupName ?
    Choose most appropriate option
    a) CheckBox
    b) RadioButton
    c) ComboBox
    d) All of the above
    Answer: b
  27. In an interview Akshay was asked to evaluate following code and determine the Output.
    class Program
    {
    static Program()
    { int number= 100; int denominator= intParse(“0”); int result = number /denominator; Console writeLine(result); }
    }
    class MyClass { static void Main() { Program program= new Program(); } }
    According to you, what should be the output of this code? Choose most appropriate option
    a) System.DivideByZeroException
    b) System.TypelnitializationException
    c) System.InvalidCastException
    d) There won’t be any exception, result would get printed.
    Answer: b
  28. Shruthi is working as a developer. She has to write the code to Create a ConnectionString. Which of
    the following parameter of ConnectionString she should use to specify the name of the database ?
    Choose two appropriate options.
    a) Provider
    b) Initial Catalog
    c) Database
    d) Data Source
    Answer: b c
  29. Which of the following is/are Statement(s) related to interface ?
    Choose most appropriate option
    a) Interface is a type whose members are all public and abstract by default
    b) Interface itself can inherit other interfaces
    c) To implement an interface, class uses the same syntax that is used for inheritance.
    d) All the above
    Answer: d 31. True/False: XML serializes only the public properties and private fields of an object.
    Choose most appropriate option
    a) TRUE
    b) FALSE
    Answer: b
  30. Refer to the below code and Identify the missing statements.
    [ServiceContract]
    Public interface IHello
    {
    void SayHello(string name);
    }
    Choose most appropriate option.
    a)
    b)
    c)
    d)

[OperationContract] attribute needs to be included about the SayHello method.
[DataMember] attribute needs to be included about the SayHello method.
[ServideContract] attribute needs to be included about the SayHello method.
None of the above.

Answer: a

  1. To execute the below code successfully, which namespace to be included
    Using System;
    class MyClass { static void Main(String[] args) { Parallel.For{21, 31, i => {Console.WriteLine(i);}};} }
    choose most appropriate option
    a)
    b)
    c)
    d)

System.Threading
System.Threading.Tasks
System.Linq
Using System.Collections.Concurrent

Answer: b

  1. Consider the following code and identiry the statements which are true?
    using System; using System.Linq;
    class OrderDemo {Static void Main(){String[] englishletters={“d”, “c”, “a”, “b”};
    var sorted = from englishletter in englishletters orderby englishletter select englishletter;
    foreach(string value in sorted) { Console.WriteLine(value);}}}
    Choose two appropriate options.
    a)
    b)
    c)
    d)

Englishletters is an unsorted array
Sorted is an IEnumerable
The output will be in the descending order
The foreach loop is responsible for sorting the englishletters

Answer: a,b

  1. Which of the following substantiates the use of stored procedure?
    Choose most appropriate option.
    a)
    b)
    c)
    d)

The number of requests between the server and the client is reduced.
The execution plain is stored in the cache after It is executed the first time
.Stored procedures accept parameters.
You can bypass permission checking on stored procedure.

Answer: b

  1. _______ is the process of converting the state od an object into a form that can be
    persisted or transported.
    Fill in the blank with an appropriate option.
    a)
    b)
    c)
    d)

Delegate
Serialization
Events
Object Initalizer

Answer: b

  1. Samriti needs to create a UML Diagram that can depict the user requirements scenarios in which
    your system or application interacts with people, organizations or external systems. Which diagram
    should she be using?
    Choose most appropriate option
    a) Use Case Diagram
    b) Class Diagram c) Object Diagram
    d) Sequence Diagram
    Answer: a
  2. Rohit wanted to print the SQL server name of his system. Which code should use in SQL server
    name?
    Choose two most appropriate options.
    a)
    b)
    c)
    d)

Select @@servername
print@@servername
select@@server
print@@server

Answer: a,b

  1. In WWF, __ is the interaction between the Host processes and a specific activity in an
    specific workflow instance.
    Choose most appropriate option.
    a)
    b)
    c)
    d)

Local Communication
Compensation
Correlation
Serialization

Answer: c

  1. How the rules or conditions expressed in WWF to implement business logic
    Choose most appropriate option
    a) Conditions can be articulated as declarative, or defined in code
    b) Rules consist a condition statement and collections of actions that are not performed based on
    the result of the condition
    c) Rules are expressed as an XML file
    d) a & c
    e) a & b & c
    Answer: d
  2. Which of the following will legally declare a construct and initialize an array?
    Choose most appropriate option.
    a) char myArray[] = {‘a’, ‘b’, ‘c’}; b) char myArray[] = {a ; b; c; );
    c) char myArray[] = {‘a’; ‘b’; ‘c’);
    d) char [ ] myArray= {‘a’, ‘b’, ‘c’};
    Answer: d
  3. Web Server provides a detailed description of the extensions, filters, and script mapping
    Choose the appropriate option
    a)
    b)
    c)
    d)

Internet Server Active Programming Interface (ISAPI}
Internet Served Application Programming Integration (ISAPI)
Internet Server Application Programming Interoperability (ISAPI)
Internet Server Application Programming Interface (ISAPI)

Answer: d

  1. A jagged array is an array of arrays, and therefore its elements are __.
    Fill in the blank with an appropriate option.
    a) Value types
    b) Reference types
    c) Both Value types and Reference types
    Answer: b
  2. Which of the following is true about ADO.NET?
    Choose most appropriate option.
    a)
    b)
    c)
    d)
    e)

ADO.NET is an object oriented set of libraries that allows you to interact with data sources.
ADO.NET classes are found in System.Data.dll.
ADO.NET classes are integrated with XML classes.
ADO.NET contains .NET Framework data provieder for connecting to a database.
All of the above.

Answer: e

  1. Identify the statements which are in Camel Case.
    Choose the two appropriate options.
    a)
    b)
    c)
    d)

Public void Show(string bookName){…}
totalAmount
BlueColor
Public event EventHandler ClickEvent

Answer: a,b

  1. Which of the following are facts about Non-persistence memory mapped files?
    Choose most appropriate option
    a) These files are memory-mapped files that are associated with a source file on a disk.
    b) When the last process has finished working with the file, the data is saved to the source file on
    the disk.
    c) These memory-mapped files are suitable for working with extremely large source files.
    d) These files are suitable for creating shared memory for inter-process communications
    Answer: d
  2. LINQ relied on the concepts of extension of extension methods, anonymous types, anonymous
    methods and _____.
    Fill in the blank with an appropriate option.
    a)
    b)
    c)
    d)

Lambda expressions
Xml expressions
Data expressions
Sql expressions

Answer: a

  1. What are the services will be provided by Windows Workflow – Foundation?
    Choose two most appropriate option
    a)
    b)
    c)
    d)

Transaction Services
Migration Services
Scheduling Services
Security services

Answer: a,c

  1. Are the following statements true or false?
    Statement 1: A Task is a schedulable unit of work. Statement
    2: Task enqueued to a TaskScheduler.
    a)
    b)
    c)
    d)

Both statements are true.
Both statements are false.
Statement 1 is false and statement 2 is true.
Statement 2 is false and statement 1 is true.

Answer: a

  1. Which of the following apply to constructor?
    Choose three appropriate options.
    a)
    b)
    c)
    d)

Constructors are methods that set the initial state of an object
Constructors cannot return a value, not even void
Constructors can be inherited
If the class does not explicitly declare a constructor, it will default to a no parameter, do
nothing constructor

Answer: a, b, d

  1. What will be the output of the below program using System;
    using System.IO;
    class Program
    { Static void Main(string[] args)
    { StreamWriter sw = File.CreateText(“C:\accenture.txt”);
    try { sw.WriteLine({“Welcome to Accenture”);}
    catch(IOException e){ Console.WriteLine(e.Message);}
    finally{ if(sw != null) sw.Close();}}}
    Choose most appropriate option
    a)
    b)
    c)
    d)

Accenture.txt file is created in C: drive
IOException will be thrown
Unhandled Exception
Compiletime Error

Answer: a

  1. Shruthi is working on the code below. When she executes this code she is facing this error – using
    directive error.
    Which of the option will resolve this error?
    Int[] numbers = new int[7] (0,1,2,3,4,5,6};
    var numQuery = from num in numbers where (num % 2 ) == 0 select num;
    foreach (int num in numQuery) {Console.Write(“{0}”, num);} Choose most appropriate option
    a)
    b)
    c)
    d)

She must use the System.Linq namespace
She must use the System.Linq.Expressions namespace
She must revise her LInq query
None of the above

Answer: a

  1. With respect to generic concept, developers can create which generic item?
    Choose three appropriate options.
    a)
    b)
    c)
    d)

Generic constant
Generic class
Generic event
Generic delegate

Answer: b,c,d

  1. Radha wants to sort data stored in an array. She doesn’t want to work on the sorting functionality.
    Do we have any provision in the .NET framework FCL to help her in sorting?
    Choose most appropriate option
    a)
    b)
    c)
    d)

Yes, she can use System.Sory(array)
Yes, she can use System.Data.Sort(array)
Yes, she can use System.Array.Sort(array)
No, she need to write the sort functionality

Answer: c

  1. Error handling in WCF service is handled by ___.
    Choose most appropriate option.
    a)
    b)
    c)
    d)

Fault Contract
ServiceContract
DataContract
MessageContract

Answer: a

  1. Which of the options is valid with respect to below statements
    Statement1: StringBuilder saves time and memory by not creating a new string each time an operation is
    performed on a string. Statement2: System.Math class provides constants and static methods for trigonometric, logarithmic,
    and assertion functions.
    Choose most appropriate option.
    a)
    b)
    c)
    d)

Statement1 is True. Statement2 is false
Statement1 is False. Statemetn2 is True
Statement1 is False. Statement2 is False
Statement1 is True. Statement2 is True

Answer: a

  1. Identify correct syntax for declaring indexer.
    Choose most appropriate option.
    a)
    b)
    c)
    d)

public int this[int index] { get{ } set{ } }
public int [int index]this { get{ } set{ } }
public this[int index] { get{ } set{ } )
public this[int index] int { get{ } set{ } )

Answer: a

  1. A/An _____ that does not have a WHERE clause produces the Cartesian product of
    the tables involved in the join.
    Choose the appropriate option
    a) Equi Join
    b) Inner Join
    c) Self Join
    d) Cross Join
    Answer: d
  2. Arun wants to retrieve result using a query “select count(*) from employee”. Which is most
    appropriate SqlCommand method for his requirement
    Choose most appropriate option
    a)
    b)
    c)
    d)

Execute Reader
ExecuteQuery
ExecuteNonQuery
ExecuteScalar

Answer: d

60. CREATE VIEW [dbo].[viewmyTable] AS SELECT D.DeptName, D.Location, E.Name FROM Department
D LEFT OUTER JOIN Employee E ON D.DeptID = E.DeptID GO
Predict the output, when the above query executed?
Choose most appropriate option
a) Commands execute successfully
b) Incomplete query
c) Syntax error
Answer: a

  1. Which of the following are True for Workspace
    Choose two appropriate options
    a) Workspace is a folder created within the local system which maps a project in the source control.s
    b) Files within the source control which needs changes, should be first loaded into the workspace of the
    local system. Any changes made to the files are stored in the local workspace.
    c) Only one workspace can be maintained for a single project in the source control.
    d) Files need to be checked-out in order to upload changes into source control.
    Answer: a,b
  2. Visibility qualifier is used for which off the following?
    Choose most appropriate option.
    a) Specifying different visibility for the get and set accessors of a property or an indexer.
    b) Setting the visibility off the accessor get and set to public even though the property visibility is set to
    protected.
    c) Setting the visibility of the accessor and set to public even though the property visibility is set to
    internal.
    d) All off the above.
    Answer:a
    63.Select the two correct two statements for xml schema(XSD)
    Choose most appropriate option.
    a) The elements is the root element for XSD. b) Has data types and namespaces,like DTDs.
    c) Elements in schemas are divided into three types: Simple Elements Mixed Elements Complex
    Elements.
    d) XSD is written similarly to xml as xsd makes use of xml syntax, hence most of the rules to xml
    apply to xsd.
    Answer:a,d
  3. State true or false for the statements for design patterns.
    Statement 1: Prototype-A fully initialized instance to be copied or cloned.
    Statement 2: Singleton-A class of which only a multiple instances can exist.
    Choose most appropriate option.
    a) All the statements are true.
    b) All the statements are false.
    c) Statement1 is true and statement2 is false.
    d) Statement2 is true and statement1 is false.
    Answer: c
    65.What is the .NET Collection class that allows an element to be accessed using a unique key?
    Choose most appropriate option.
    a) Arraylist
    b) StringCollection
    c) Stack
    d) Hashtable
    Answer: d
  4. Rajesh needs to copy only specific range of elements from MyArray to copyMyArray. He is using
    Follwing code.
    Int[] myarray= new int[3] {20,19,21};
    Int[] copyarray= new int[3];
    Array.Copy(myarray,copyarray,1); Would this code give him desirable Output?
    Choose most appropriate option.
    a)Yes
    b)No
    Answer:a
  5. Consider the following statements and identify the WCF program 1,These are programs that
    consume the services 2.They are normally the ones the initiate the messaging to the service.
    Choose most appropriate option.
    a) Message
    b) Client
    c) Intermediates
    d) None of the option
    Answer:b
    68.Which of the bbelow syntax is correct to define operator method or to perform operator
    overloading?
    Choose most appropriate option.
    a) Public static op(arglist) {}
    b) Public static returnvalue op(arglist){}
    c) Public static returnvalue operator op(arglist){}
    d) All of the above
    Answer:c
  6. Identify two conditions from the following that need to be met for multicast delegates.
    Choose most appropriate option.
    a)None off the parameters of the delegate is an output parameter.
    b)The return type of the delegate is void.
    c)The parameter o the delegate is an output parameter Answer:a,b
  7. What is /are the different component(s) off LINQ?
    Choose most appropriate option.
    a) LINQ to Objects
    b) LINQ to XML
    c) LINQ to SQL
    d) LINQ to Entity
    e) All of the above
    Answer: e
    71.Identify the description of @@IDENTITY.
    Choose most appropriate option.
    a) Returns the error number for the last Transact-SQL statement executed.
    b) Returns the last –inserted identity value.
    c)Returns the number of rows affected by the last Statement.
    Answer:b
    72.Identify the list off Common Exception Classes
    Choose most appropriate option.
    a)
    b)
    c)
    d)
    e)

System.StackException
Syystem.NullReferenceException
System.ArrayTypeMismatchException
System.TypeMisMatchException
System.InvvalidCastException
Answer:b,c,e

  1. Read the statement below and identify the workflow component This is the act of undoing any
    actions that were performed by a successfully completed activity because of an exception that occurred
    elsewhere in a workflow
    Choose most appropriate option.
    a) Activity b) Compensation
    c) Service
    d) Workflow persistence
    Answer:b
  2. John is developing an application for ABC company in which he wants to combine application UIs,2D
    graphics,3D graphics, documents and multimedia is one single framework. Which component can he
    use?
    Choose most appropriate option.
    a)WPF
    b)WCF
    c)Linq
    d)OOPS
    Answer: a
    75.What is/are the advantages of LINQ over stored procedures?
    Choose most appropriate option.
    a)Debugging- it is really very hard to debug the stored procedure but as LINQ is part off .NET, you can
    use visual studio’s debugger to debug the queries.
    b)Deployment- With stored procedures, we need to provide an additional script for stored procedures
    but with LINQ everything gets compiled into single DLL hence deployment becames easy.
    c)Type Safety- LINQ is type safe, so queries errors are type checked at compile time.it is really good to
    encounter an error when compiling rather than runtime exception
    d)All off the above
    Answer: d
  3. which of the below are valid Statements about DataReader and Data set
    Choose most appropriate option.
    a) DataReader reads all the the records at a time and it is used in multiple databbbases.
    b) DataSet always reads one record at a time and it moves into a forword direction. c) DataReader is a connected Architecture
    d) Dataset is a collection of in memory tables
    Answer:c,d
  4. Identiffy the functions of common type System(CTS)
    Choose most appropriate option.
    a) They form the fundamental unit off deployment, version control, reuse, activation scoping, and
    security permissions
    b) Most off the members defined by types in the .NET framework class Library are CLS-compliant
    c) Establishes a framework that helps enable cross-Language integration, type safety, and high
    performance code execution
    d) Provides an object –oriented model that supports the complete of many programming
    languages
    Answer:c,d
  5. Identify the tasks a user is able to perform in Source Control Explorer
    Choose most appropriate option.
    a) Create/Rename/Delete files and folders
    b) Check in/out files
    c) Get latest/Specific version
    d) All of the above
    Answer:d
    79.__ Represents the standard input, output, and error streams ffor console applications.
    This class cannot be inherited.
    Fill the blank with appropriate option.
    a) Console class
    b) TextWriter class
    c) Text class
    Answer:a
    80.What is the namespace for “Task” class?
    Choose most appropriate option. a) System.Tasks
    b) System.Threading.Tasks
    C) System.Diagnostiscs.Tasks
    d) System.Dynamic.Task
    Answer:b
    81.State true or false for the below statements.
    Statement1 : Multicast delegates are used extensively in event handling.
    Statement2 : Delegation can be used to define callback methods
    Choose most appropriate option.
    a) Statement1 and Statement2 are true
    b) Statement2 is true and Statement2 is false
    c) Statement1 is true and Statement2 is false
    d) Statement2 and Statement1 are False
    Answer:a
    82.________________namespace provides classes for using a memory mapped ile,which maps the
    contents of a file to an applications logical address space.
    Fill with the most appropriate option.
    a)System.MemoryMappedFile
    b)System.MemoryMappedFiles
    c)System.IO.MemoryMappedFiles
    d)System.IO.Memory
    Answer:c
    83.Identify the WCF contract considering the following statement
  6. WCF contracts defines implicit contracts for built in data types like string and int.
  7. This contract defines which data types are passed to and from the service
    Choose most appropriate option. a) Service Contract
    b) Fault contact
    C) Data Contract
    d) Message contact
    Answer:c
  8. Which of the below statements are correct about Indexers
    Choose most appropriate option.
    a) Indexers are location indicators
    b) Indexers are used to access class objects
    c) Indexer is a form of property and works in same way as a property
    d) a&b
    e) b&c
    f) a,b&c
    Answer:f
    85._________and __________ methods of a delegate helps to process delegate
    asynchronously
    Fill the blank with appropriate option.
    a) BeginInvoke(),EndInvoke()
    b) InvokeBegin(),InvokeEnd()
    c) Begin(),End9)
    d) BeginInvokeDelegate(),EndInvokeDelegate()
    Answer:a
    86.Which option gets the version of the selected file/folder specific to date, changeset, label,or
    workspace version?
    Choose most appropriate option.
    a)GetSpecificFile b)GetLatestVersion
    c)GetSelectVersion
    d)GetSpecificVersion
    Answer:d
    87.All query operations of LINQ consist of three district actions
    Choose most appropriate option.
    a)
    b)
    c)
    d)
  9. Obtain the data source 2. Declare the Data source 3.Excute the data source
  10. Declare the data source 2.Initialize the query 3. Execute the query
  11. Declare the Data source 2. Create the data source 3 .Execute the Data source
  12. Obtain the data source 2.Create the query 3. Execute the query
    Answer:d

88.Rajesh is implementing an ASP.NET page. The page include a method named GetProjectAllocation
that returns dataset. The Dataset includes a datatable named ProjectAllocation. Rajesh need to show
the data in GridView control named GridView1
Choose most appropriate option.
a)Gridview1.DataTable=GetProjectAllocation();
b)GridView1.DataTable=GetProjectAllocation();GridView1.DataBind();
c) GridView1.DataSource=GetProjectAllocation();GridView1.DataBind();
d) GridView1.DataSourceId=GetProjectAllocation();GridView1.DataBind();
Answer:c
89._____________is a pre defined, reusable routine that is stored in adatabase
Fill the blank with most appropriate option.
a) Function
b) Stored Proccedure
c) View
d) Joins
Answer:b
90.Which of the following are True for Workspace

Choose two appropriate options
a) Workspace is a folder created within the local system which maps a project in the source control.s
b) Files within the source control which needs changes, should be first loaded into the workspace of the
local system. Any changes made to the files are stored in the local workspace.
c) Only one workspace can be maintained for a single project in the source control.
d) Files need to be checked-out in order to upload changes into source control.
Answer: a,b

  1. In LINQ , all the core types are defined in _
    Choose most appropriate option.
    a) System.Linq.XML and System.Linq.Expressions
    b) System.Linq and System.Linq.XML
    c) System.Linq and System.Linq.Expresssions
    d) System.XML.Linq and System.Linq.Expressions
    Answer : C
  2. The _ hosting option is integrated with ASP.NET and uses the features these technologies
    offer, such as process recycling , idle shutdown ,process health monitoring , and message based
    activation.
    Choose most appropriate option
    a) IIS
    b) Windows Services
    c) WAS
    d) Self Hosting
    e) All of the above
    f) None of the above
    Answer : A
  3. What are true about Static Constructors
    Choose two appropriate options
    a) Static variable get instantiated after the static constructor
    b) Static constructors provide the flexibility of statically initializing static variables
    c) Static constructors have access to static members of theirs class only
    d) A static constructors does not have parameters and access modifiers cannot be applied to it
    Answer : C, D
  4. Which of the below statement(s) are valid in Operator Overloading?
    Choose most appropriate option
    a) The conditional logical operators cannot be overloaded
    b) The array indexing operator can be overloaded c) The comparison operators cannot be overloaded
    d) All of the above
    e) None of the above
    Answer : A
  5. You want to make a configuration setting change that will affect only the current web
    application. Which file will you change?
    Choose most appropriate option
    a) Web.config
    b) Machine.config
    c) Global.asax
    Answer : A
  6. Testing which attribute should be used to run code before the first testis run in the class?
    Choose most appropriate option
    a) TestInitialze()
    b) TestClass()
    c) ClassInitialize()
    d) TestStart()
    Answer : C
  7. VSTS is also used for automated unit testing of components and regression testing.
    State TRUE or FALSE
    a) FALSE
    b) TRUE
    Answer : TRUE
  8. Which access modifier cannot be used with data members of a structure?
    Choose most appropriate option
    a) Public
    b) Protected
    c) Internal
    d) Private
    Answer : B
  9. Anand has created a master page named Plant.master. the master page uses the following page
    directives.
    <%@ Master Language=”c#” Src=”~/Plant.master.cs” inherits=”Plant” %>
    He needs to create a content page that uses the master page as a template. In addition , he
    needs to use a single master page for all devices that access the web site. Which code segment
    should be use ?
    Choose most appropriate option a)
    b)
    c)
    d)

<%@ Page Language=”c#” Theme=”Plant” Skin=”Plant.cs”%> <%@ Page Language=”c#” MasterPageFile=”~/Plant.master” %> <%@ Page Language=”c#” device:MasterPageFile=”~/Plant.master” %> <%@ Page Language=”c#” de:MasterPageFile=”~/Plant.master” %>

Answer : B
100.
CREATE VIEW [dbo].[viewmyTable] AS SELECT D.DeptName , D.Location , E.Name FROM
Department D JOIN Employee E ON D.DeptID = E.DeptID GO Predict the output , when the
above view is executed ?
Choose most appropriate option
a) A view will be created by selecting deptname , location from the department table and
employees name from the employee table .
b) Syntax error
c) Incomplete query
d) A view will be created by selecting deptname , location and name from the department
table.
Answer : A

101.
Are the methods below a valid overload
Public int Sum(ref int a , ref int b)
Public int Sum(out int a , out int b)
Choose most appropriate option
a) Yes
b) No
Answer : No
102.

State true or false for the below statements.

Statements1. Extension Methods: Which gives us the capabilities to asses our own custom
methods to data types without deriving from the base class.
Statement2. Object Initializer: allows you to pass in named values for each of the public
properties that will be used to initialize the object.
Choose most appropriate option
a) Statement 1 and statement 2 are true.
b) Statement 1 and statement 2 are false.
c) Statement 1 is false and statement 2 is true.
d) Statement 2 is false and statement 1 is true.
Answer : A

103.
True/False : Fault Handling is a method of the workflow runtime engine that
synchronously handles the exceptions that occur in the activities
Choose most appropriate option
a) TRUE
b) FALSE
Answer : FALSE
104.
Which of the following are true about Delegates?
Choose three appropriate options
a) A delegate can reference a method only if the signature of the method exactly matches the
signature specified by the delegate type
b) A delegate allows the programmer to encapsulate a reference to a method insidea delegate
object
c) Delegate are similar to function pointers
d) Generally useful way for objects to signal state changes that may be useful to clients of that
object.
Answer : A ,B ,C
105.
Amulya has created following class:
Public class Employee { public int EmployeeCode{ get; set;} public string EmployeeName{get;
set;} public int EmployeeAge{get; set;}}
Please select correct code for initializing an object by using Object initializers.
Choose most appropriate option
a) Employee emp = new Employee(EmployeeCode=111;
EmployeeName=”Raghav” ;EmployeeAge=26;};
b) Employee emp = new Employee{EmployeeCode=111,
EmployeeName=”Raghav”,EmployeeAge=26};
c) Employee emp = new Employee(){EmployeeCode=111;
EmployeeName=”Raghav”;EmployeeAge=26;};
d) Employee emp = new Employee(){EmployeeCode=111,
EmployeeName=”Raghav”,EmployeeAge=26};
Answers : B
106.
Identify which statements are false about windows Presentation foundation(WPF)
Choose two appropriate options
a) Used for standalone and browser hosted applications
b) Uses XAML markup to implement the appearance of an application
c) The service-oriented design results in distributed systems that runs between services and
clients
d) Provides a programming model for building workflow-based applications in windows
Answer: C , D
107.

How do you specify a constraints for the type to be used in a generic class

Choose most appropriate option
a) Class Program where T: MyInterface
b) Class Program : MyInterface
c) Class Program constraint T : MyInterface
d) Class Program where T : MyInterface
Answer: A
108.
VIEW [dbo].[viewmyTable] AS SELECT D.Deptname,D.location ,E.Name FROM
Department D FULL OUTER JOIN Employee E ON D.DeptID = E.DeptID
Whats the output , when the above query is executed?
Choose most appropriate option
a) Display all the employees with their Departments .Output contains
b) The employee names and all the department names present in the database
c) Syntax error
d) Incomplete Query
Answer : A
109.
Which is the top .NET class from which everything is derived?
Choose most appropriate option
a) System.Collections
b) System.Globalization
c) System.Object
d) System.IO
Answer : C
110.
From the following option choose the features of WPF
Choose three appropriate options
a) Rich Composition
b) Seperation of appearance and behavior
c) Resolution dependence
d) Highly customizable
Answer : A , B ,D
111.
WCF host can be IIS or WebService or Console Application
Choose most appropriate option
a) TRUE
b) FALSE
Answer : TRUE
112.
Sam is developing an application in which he wants to use child controls are positioned
by rows and columns . which layout he can use ?
Choose most appropriate option

a)
b)
c)
d)

Grid
Canvas
Dock panel
Stack panel

Answer : A
113.
Identify the code snippet for creating custom exception class
Choose most appropriate option
a) Class CustomException:ApplicationException{}
b) Class CustomException : AppException{}
c) Class ApplicationException : CustomException{}
d) None of the above
Answer : A
114.
Which of the following is true about overloading?
Choose most appropriate option
a) Overloaded methods must change the argument list.
b) Overloaded methods can change the return type.
c) Overloaded methods can change the access modifier.
d) All of the above.
Answer : D

37.using System;
class NamedParameterExample
{
static void Method(int num1,int num2, int num3=30)
{
Console.WriteLine(“num1={0}, num2:{1},num3:{2}”, num1,num2,num3);
}
public static void Main()
{
Method(num2:20,num1:10,num3:100);
}
}
Answer:$mono main.exe
num1=10, num2:20,num3:100
39.using System;
using System.Collections;
namespace ConsoleApplicationdemo
{
class Program
{
static void Main()
{
ArrayList myList = new ArrayList();
myList.Add(32);
myList.Add(12);
myList.Add(22);
myList.Sort();
for(int index=0;index<=myList.Count;index++)
{
Console.WriteLine(myList[index]+”\t”);
}
}
}
}
Ans:
12

22

32

  1. ————class is used to find object metadata(i.e methods, fields, properities at runtime
    System type
    System.assembly
    System.String
    System.Refelection.
  2. Topic c # sub-topic XML_Serialisation
    which of the following attribute should be used to indicate the property must not be serialised while
    using JSON serailiser
    XML.Ignore
    IgnoreDatamember
    Ignoreproperty JSON ignore
    43.Which of the following is false about interface?
    No options
    1.Topic:.NET;Subtopic:Introduction to Design Documents
    Zeenat needs to create a UML Diagram that can depict the user requirements, scenarios in which
    your system or application interacts with people, organizations or external systems. Which diagram
    should she be using?
    Choose most appropriate option
    i.Object Diagram
    ii.Sequence Diagram
    iii.Class Diagram
    iv.Use Case Diagram
    answer : Use Case Diagram
    Topic:.Net, Subtopic: Team Foundation Server 2010
    2.Multiple workspaces can be maintained for a single project in the source control.
    State TRUE or FALSE.
    i.TRUE
    ii.FALSE
    answer : false
    Topic. NET4.0;Subtopic:LINQ
    3.Consider the following code and identify the statements which are true?
    using System; using System.Linq;
    class OrderDemo
    static void Main()
    string[] englishletters= { “d”, “c”, “a”, “b” };
    var sorted from englishletter in englishletters
    orderby englishletter select englishletter;
    foreach (string value in sorted)
    i.The output will be in the descending order
    ii.The foreach loop is responsible for sorting the englishletters
    iii.sorted is an IEnumerable
    iv.englishletters is an unsorted array
    Topic:.Net, Sub-Topic: Delegates and Events
    4.Consider the following code:
    using System;
    public class A
    string name; public A(string name)
    this.name = name;
    } public void Display(string message)
    Console.WriteLine(“{0} {1}”, name, message);
    }
    class MainClass
    { i.Compilation Error
    ii.apple boy
    iii.boy apple
    iv.boy
    answer : boy apple
    Topic:.Net4.0, Sub-Topic: SqlServer 2008
    5.Which statement finds the rows in the Employee table that do not have Manager? Click on
    hyperlink to view the EMP Table.
    Choose most appropriate option.
    i.SELECT EMPNO ENAME MGR FROM EMP WHERE MGR = NULL;
    ii.SELECT EMPNO ENAME,MGR FROM EMP WHERE MGR = NULL;
    iii.SELECT EMPNO ENAME MGR FROM EM WHERE MGR CONTAINS NULL;
    iv.SELECT EMPNO ENAME,MGR FROM EMP WHERE MGR IS NULL;
    answer : SELECT EMPNO ENAME,MGR FROM EMP WHERE MGR IS NULL;
    Topic: .NET, Sub-Topic: LanguageFundamentals
    6.Given the following code:
    class SwitchExample
    {
    public static void Method1(){ Console. WriteLine(“in Method1”); }
    public static void Method2() { Console.WriteLine(“in Method2”); }
    public static void Method3() { Console.WriteLine(“in Method3”); }
    public static void Method4() { Console.WriteLine(“in Method4”); }
    public static void MethodSwitch(int x)
    switch(x)
    case 1: Method1();
    break; case 2:
    break; case 3:
    Method2();
    Method3();
    i.for(int i=1;i<=2;i++) MethodSwitch(i);
    ii.for(int i=1;i<=5;i++) MethodSwitch(i);
    iii.for(int i=1;i<=4;i++) MethodSwitch(i);
    iv.for(int i=1;i<=3;i++) MethodSwitch(i);
    answer: for(int i=1;i<=4;i++) MethodSwitch(i);
    Topic:.Net, Sub-Topic: CoreUtilities
    7.Consider the following code:
    using System; using System.Collections.Generic;
    using System.Linq; using System.Text;
    namespace ConsoleApplication3
    class StringDemo
    public static void Main()
    String str=”AAA”,s1=”AA”;
    StringBuilder stringB=new StringBuilder(s1);
    Console.WriteLine(stringB.Equals(str)+”,”+ str.Equals(s1));
    i. False, False ii.False, True
    iii.True False
    iv. True, True
    answer : False, False
    Topic: Net, Sub-Topic Collection
    8.Below is the Collection Interface list with their meaning in unorganized order.
    1-Purpose of Idictionary: Exposes a method that compares two objects.
    2-Purpose of list:Defines size, enumerators and synchronization methods for all collections,
    3-Purpose of Icomparer Represents a collection of koy-and-valus pairs.
    4-Purpose of Icollection Represents a collection of objects that can be individually accessed by
    index.
    Choose the best option to organize the above collection Interface and its meaning.
    Choose most appropriate option.
    i.1-ldictionary Represents a collection of key-and-value pars 2-list Exposes a method that compares
    two cbjects 34comparer Represents a collection of objects that can be individually accessed by index
    4 calection Defines sze, enumerators and synchronization methods for all collections
    ii.1-ldictionary Defines size, enumerators and synchronization methods for all colections 2-list
    Exposes a method that compares two objects 3 Icompares Represents a collection of objects that
    can be individually accessed by index 4collection Represents a collection of key-and-value pairs
    iii.1 .lcollection Defines size, enumerators and synchronization methods for all collections
    21comparer Exposes a method that compares two objects 3 dictionary Represents a collection of
    key-and-value pairs 4 list Represents a collection of objects that can be individually accessed by
    index
    iv.1-ldictionary Represents a collection of key-and-wake pais 2list Defines size enumerators and
    synchronization methods for all collections comparer Represents a collection of objects that can be
    individually accessed by index 4-icollection Exposes a method that compares two objects.
    Answer: 1 .lcollection Defines size, enumerators and synchronization methods for all collections
    21comparer Exposes a method that compares two objects 3 dictionary Represents a collection of
    key-and-value pairs 4 list Represents a collection of objects that can be individually accessed by
    index
    Topic: .NET Subtopic: Arrays
    9.After understanding following code snippet, Sudhir is to determine the output of the following
    code:
    int[] myarray = new int3;
    int[] copyarray= new int[3];
    Array.Copy(myarray, 0,copyarray,1, 1);
    Console.WriteLine(“{0)-(1)-(2)”, copyarray[0], copyarray[1], copyarray[2]);
    According to you, what should be the output?
    Choose most appropriate option
    i.0-20-0
    ii.20-19-0
    iii.20-19-21
    iv. None of the above, use of unassigned array index results in error.
    Answer : None of the above, use of unassigned array index results in error. Topic:.NET Subtopic: Exception Handling
    10.Sudhir wanted to evaluate scenarios where he might encounter the InvalidCastException. He is
    expecting this exception from the following code:
    int intvar = 2;
    object objvar (object)intvar;
    short shortvar (short)objvar; Do you think he will get the expected Exception type?
    Choose most appropriate option
    i.No
    ii. Yes
    answer: no
    Topic:.NET, Sub-Topic: C= Features
    11.If str1 and str2 are references to two strings, then which of the following is the correct way
    to compare the two references?
    Choose most appropriate option
    i.strcmp(str1, str2)
    ii.str1.Equals(str2)
    iii.stri is str2
    iv.str1= str2
    v.stri== str2
    answer : str1.Equals(str2
    183.using System;
    using System.Collections;
    namespace ConsoleApplicationdemo
    {
    class SwitchExample
    public static void Method1()
    {
    Console.WriteLine(“in Method1”);
    }
    public static void Method2()
    {
    Console.WriteLine(“in Method2”);
    }
    public static void Method3()
    {
    Console.WriteLine(“in Method3”); }
    }
    public static void Method4()
    {
    Console.WriteLine(“in Method4”);
    }
    public static void MethodSwitch(int x)
    switch(x)
    case 1: break;
    Method1();
    case 2 break, Method2():
    case 3: Method3();
    // options
  • for(int 1, 2++) MethodSwitch().
  • for(int 1, 3,++) MethodSwitch().
  • for(int 1,<=5++) MethodSwitch();
  • for(int i=1,i<= 4;i++) MethodSwitch(i),——-Incomplete code
    }
    184.For long running tasks it is preferable to create your own threads using—————–delegate.
    Choose most appropriate option.
  1. ThreadCreate
  2. ThreadPulse
  3. ThreadPool
  4. ThreadStart
    185.static void Main()
    string[] englishletters= (“d”, “c”, “a”, “b” );
    var sorted from englishletter in englishletters
    orderby englishletter
    select englishletter;
    foreach (string value in sorted)
    Console.WriteLine(value)
    }
    Skills Examiner
    Knowledge Management
    Choose two appropriate options.
  • The output will be in the descending order
  • The foreach loop is responsible for sorting the englishletters
  • sorted is an IEnumerable
  • englishletters is an unsorted array
    Topic: NET4.0, Sub-Topic: SqlServer2008

186.Which of the following substantiates the use of stored procedure?
Choose most appropriate option.

  • You can bypass permission checking on stored procedure
  • The execution plan is stored in the cache after it is executed the first time.
  • The number of requests between the server and the client is reduced
  • Stored procedures accept parameters
    Topic: NET, Sub Topic Parallel programming
    187.Identify the below option for implementing for loop in parallel program.
    Choose most appropriate option.
  • For
  • Parallel.for
  • For.parallel
  • foreach
    Topic: .NET4.0; Subtopic: Exception Handling
    189.Dharmendra was trying following code:
    string[] myArray = { “MDC”, “DDC”, “PDC”, “CDC”, “BDC”, “HDC” };
    object[] myArrayId= myArray;
    myArrayId[0]= 5;
    Console.WriteLine(“{0}”, myArrayId[0]); According to you, which of the following exception will he get?
  • System Array TypeMismatchException
  • System IndexOutOfRangeException
  • System InvalidCastException
  • There won’t be any exception
    190.using System;
    class OptionalExample
    static void Method(int x=25)
    Console. WriteLine(‘value={0}”,n);
    }
    static void Main()
    Method();
    }}
  • Value 25
  • Value=0
  • Value = null
  • None of the above
    1.consider the following program:
    using system;
    class OptionalExample
    {
    static void Method(int x=25)
    {
    console.WriteLine(“Value={0}”,n);
    }
    static void Main()
    {
    Method();
    }
    }
    What will be output of above program?
    a.Value=25
    b.Value=0
    c.Value=null
    d.None of the above
    Ans:None of the above
    2.consider the following code and identity the statement which are true?
    ListVegetables = new List{“Tamatoes”,”Potatoes”,”Onions”};s
    String MatchingVeggi = Vegetables.Find(Name=>Name.startWith(“o”));
    choose three appropriate options
    a.Name is the function argument and it could have been named as “V” or “Veg” or anyting else
    b.Name=> Name.StartWith(“o”)is Lambda expression
    c.Name=> Name.StartWith(“o”)is not Lambda expression
    d.The Fine function runs the lambad expression against each list item until a match is
    Ans: options A,B,D 3.For long running tasks it is preferable to create your own thread using __ delegate
    choose most appropriate option.
    a.ThreadPool
    b.ThreadCreate
    c.ThreadStart
    d.ThreadPulse
    Ans:ThreadStart
    4.consider the following statements:
    statement1-Thread.Join():This method blocks the calling thread util the thread terminates.
    statement2-task.wait():Task can wait for one or more tasks to end using wait
    choose most appropriate option.
    a.statement1 is false statement2 is false
    b.statement2 is false statement2 is true
    c.statement1 is true statement2 is true
    d.statement1 is true statement2 is false
    Ans:options C
    5.consider the following program:
    using system;
    delegate string myDelegate(string str);
    class A
    {
    static string str1(string a)
    {
    console.write(“Apple”);
    return a;
    }
    static string str2(string a)
    {
    console.writeL(“boy”);
    return a;
    }
    a.compliation error
    b.cat dog
    c.apple boy
    d.apple boy cat dog
    Ans: apple boy
    6.Dharmendra was trying following code:
    string[] myArray = {“MDC”,”DDC”,”PDC”,”CDC”,”BDC”,”HDC”};
    object[] myArrayId = myArrayId[0]);
    myArrayId[0]=5;
    console.WriteLine(“{0}”,myArrayId[0]);
    According to you which of the following exception will get?
    a.There wont’t be any exception b.System.invalidCastException
    c.System.indexOutRangeEXception
    d.System.ArrayTypeMismatchEXception
    Ans: There wont’t be any exception

Q . What will be the output of following code snippet, if the value entered by the user is a
string like “abc”?
Assume the code is written inside a method of a class.
int index;
int value = 100;
int[] arr= new int[10];
try
{
Console.Write(“Enter a number: “);
index = Convert.ToInt32(Console.ReadLine());
arr[index] = value;
}
catch (FormatException e)
{
Console.Write(“Bad Format “);
}
catch (IndexOutOfRangeException e)
{
Console.Write(“Index out of bounds “);
}
Console.Write(“Remaining program “);

OPTIONS:
Bad Format
Remaining program
Index out of bounds
Bad Format Remaining program
Index out of bounds Remaining program

ANS : Bad Format Remaining program
Q . What will be the output of the follwing code
using System;
public class Program
{
public static void Main()
{
int[] first ={6,7};
int[] second = {1,2,3,4,5};
second = first ;

foreach(int j in second)
{
Console.WriteLine(j);
}
}
}

OPTIONS:
Prints 6 7
Prints 6 7 3 4 5
Prints 1 2 3 4 5
Prints 1 2 3 6 7
ANS: Prints 6 7

Q. Topic : C#, Sub_Topic : XML_Serilization
Which serilization serializes even private access specifier properties ?
ANS: You cannot serialize private members using XmlSerializer unless
your class implements the interface IXmlSerializable.
Q. What will be the output of following program ?
using System;
namespace Test_App
{
class SampleClass
{
public void GreetUser()
{
Console.WriteLine(“Hello Customer”);
}
static void Main(String[] args)
{
global::Test_App.SampleClass sc=new SampleClass();
sc.GreetUser();
Console.ReadLine();
}
}
}
class SampleClass
{
public void GreetUser()

{
Console.WriteLine(“Hello Premium Customer”);
}
}

OPTIONS:
Hello Premium Customer
Hello Customer
Hello Customer, Hello Premium Customer
Runtime error
ANS:

Q. class Demo
{
static int x;
int y;
Demo()
{
x++;
y++;
Console.WriteLine(x + ” ” + y + ” “);
Console.ReadLine();
}
static void Main(string[] args)
{
Demo d1 = new Demo();
Demo d2 = new Demo();
}
Ans. 1 1
Q. class DynamicDemo
{
public static void Main(string[] args)
{
dynamic val1 = 500;
dynamic val2 = “jyothi”;
val1 = val2;
Console.WriteLine(“val1={0},val2={1}”, val1.GetType(), val2.GetType());
Console.ReadLine();
}
Ans. val1=System.String,val2=System.String
Q. The Class whcih Doesn’t allow objects creation, but represents as parent class of child classes, is
known as…..
Ans. Abstract

1. int? num = 100;
num = null;
Console.WriteLine(num.GetValueOrDefault());
Ans: 0

  1. class Program
    {
    void Method(int a, int b, out int c, ref int d)
    {
    a = a + 1;
    b = b + 2;
    c = a + b;
    d = c – 1;
    }
    static void Main(string[] args)
    {
    int first = 10, second = 20, third, fourth = 30;
    Program p = new Program();
    p.Method(first, second, out third, ref fourth);
    Console.WriteLine(“{0} {1} {2} {3} “, first, second, third, fourth);
    }
    }
    }

Ans: prints 10 20 33 32

  1. enum Numbers
    {
    One = 100,
    Two,
    Three
    }
    class Program
    {
    static void Main()
    {
    Console.WriteLine((int)Numbers.Three);
    }
    }

Ans: 102

  1. Method overriding is a concept related to?
    Ans: dynamic polymorphism
  2. class Test
    { int num1 = 10;
    public Test()
    {
    Console.write(num1+” “);
    }
    public Test(int num2)
    {
    Console.write(num2)
    }
    }
    class Program
    {
    public static void Main()
    {
    Test obj = new Test();
    Test obj1 = new Test(10);
    }
    }
    Ans: 10 10
  3. using System;
    class Maths
    {
    public void Add(int num1, int num2)
    {
    Console.Write((num1 + num2) + ” “);
    }
    public void Multiply(int num1, int num2)
    {
    Console.write((num1 + num2 + ” “);
    }
    }
    class Program
    {
    public delegate void MathDelegate(int num1, int num2);
    static void Main(string[] args)
    {
    MathDelegate mathDe1;
    Maths mt = new Maths();
    mathDe1 = new MathDelegate(mt.Add);
    mathDe1 += new MathDelegate(mt.Multiply);
    mathDe1(25, 20);
    Ans: 45 500
  4. In an interview, Sujit was asked to evaluate following code and determine the output
    class Program
    {
    static Program() {
    int number = 100;
    int denominator = int.Parse(“0”);
    int result = number/denominator;
    Console.WriteLine(result);
    }
    }
    class MyClass
    {
    static void Main()
    {

Ans: System DivideByZeroException

  1. string name;
    public A(string name)
    {
    this.name = name;
    }
    public void Display(string message)
    {
    Console.WriteLine(“{0} {1}”, name, message);
    }
    }
    class MainClass
    {
    delegate void myDelegate(string message);
    public static void Main()
    {
    A obj1 = new A(“boy”);
    myDelegate obj2 = new myDelegate(obj1.Display)
    Ans: boy apple
  2. {
    this.name = name;
    public void Display(string message)
    {
    Console.WriteLine(“{0} {1}”, name, message);
    }
    }
    class MainClass
    {
    delegate void myDelegate(string message);
    public static void main()
    {
    A obj1 = new A(“boy”);
    myDelegate obj2 = new myDelegate(obj1.Display); obj2(“apple”);
    Console.Read();
    }
    Ans: apple boy
  3. {
    static void Main()
    string[] englishletters= {“d”, “c”, “a”, “b”};
    var sorted = from englishletter in englishletters
    order by englishletter
    select englishletter;
    foreach{string value in sorted}
    {
    Console.WriteLine(value);
    }
    }
    }

Ans: All four options
a) english letters is an unsorted array
b)sorted is an iEnumerable
c)The foreach loop is responsible for sorting the english letters
d)The output will be in the descending order

  1. using System;
    public class Program
    {
    public static void Main(string[] args);
    {
    try
    {
    int num1 = 5;
    Console.WriteLine(num1);
    try
    {
    int num3 = 5;
    int num4 = 0;
    int num5 = num3 / num4;
    Console.WriteLine(num4);
    }
    catch (DivideByZeroException ex)
    {
    Console.WriteLine(“Divide by Zero Exception”);
    }
    catch (Exception ex)
    {
    Console.WriteLine(“Outer Catch”);
    } Ans: 5 Divide Zero Exception
    Q. In an interview, sujit was asked to evaluate following code and determine the output.
    Class program
    {
    Static program()
    {
    Int number =100;
    Int denominator = int.parse(“0”);
    Int result = number/denominator;
    Console.WriteLine(result);
    }
    }
    Ans. System.DivideByZeroException
    Q. Which of the following options are the features of WPF,
    Choose three appropriate options.
    Ans. Rich Composition, Highly customizable, Separation of appearance and and behvior
    Q. Poorava has created following class:
    Public class Employee
    {
    Public int Employeecode{get;set;}
    Public string EmployeeName{get; set;}
    Public int EmployeeAge{get;set;}
    Please select correct code for initializing an object by using object initializers
    Ans. Employee emp=new Employee{ EmployeeCode=111, EmployeeNmae=”Raghav”,
    EmployeeAge=26};
    Q. Are the following statements true or false?
    Statement 1: LINQ provides a unified programming model to different data domains for data
    management.
    Statement 2: Language integrated query is set of framework features for sturcuted type-safe
    queries.
    Choose most appropriate option.
    Ans. Both statements are ture.
    Q. Identify the output for the program below –
    Class ExampleDemo
    {
    Public static void main(string[] args)
    {
    Cosole.WriteLine(“River of \ndreams”);
    Console.WriteLine(“so far\nso good”);
    }
    }
    Choose most appropriate option.
    Ans. River of dreams so far so god…………………..> will display in different line.
    Q. Identify the output for the program below Class ExampleDemo
    {
    Public static void Main(string[] args)
    {
    Cosole.WriteLine(“River of \ndreams”);
    Console.WriteLine(“so far\nso good”);
    }
    }
    Ans. River of \n dreams so far \nso good……………> will display in different line.
    Q. Consider the following code:
    Using system;
    Public class A
    {
    This.name=name;
    }
    Public void display(string message)
    {
    Console.writeline(”{0} {1}”, name, message);
    }
    Ans. Apple boy
    Q. Consider the following statements and identify the WCF program
  2. These are programs that consume the services
  3. They are normally the ones that initiate the messenging to the service.
    Choose most appropriate option
    Ans. Client
    Q. Consider the following code and identify the statements which are true?
    Using System;
    Using System.Linq;
    Class orderDemo
    {
    Static void demo();
    {
    String[] englishletters = {“d”.”c”,”a”,”b”};
    Var sorted = from English letter in englishletters
    Orderby englishletter
    Select englishletter;
    Ans. Sorted is an IEnumerable
    Englishletters is an unsorted array
    Q. Which of the following substantiates the use of stored procedure?
    Choose most appropriate option.
    Ans. The execution plan is stored in the cache after it is executed the first time.
    Q. GAC is a machine-wide code cache that is used to store assembles that are crwted to be shared by
    multiple applications. An assembly can be added to the GAC by using.
    Choose most appropriate option.
    Ans. Gacutil.exe
    Q. Identify the below option implementing for loop in parallel program.
    Choose most appropriate option.
    And. Parallel.For Q. Which namespace contains classes that can be used to define culture-related information?
    Choose most appropriate option.
    Ans. System.Globalization
    Q. Consider the following statements:
    Statement1- Thread.Join(): This method blocks the calling thread until the thread terminated.
    Statement2 – task.Wait() Task can wait for one or more tasks to end using wait.
    Ans. Statement1 is true Statement2 is True.
    1.Please select correct sequence for lifecycle of WCF programming:
  4. Build a client application.
  5. Define the Service Contract.
  6. Host the service in an application.
  7. Implement the contract.
  8. Configure the service.
    Choose most appropriate option.
    A.4,5,2,3,1
    B.4,2,5,3,1
    C.2,4,3,5,1
    D.2.4.5.3.1
    Answer-2.4.5.3.1
    2.Employee emp=new Employee
    {
    EmployeeCode=100,
    EmployeeName=”Raj”,
    EmployeeAge=25
    Choose most appropriate option.
    A.Extension Methods
    B.Collection Initializers
    C.Anonymous types
    D.Object Initializers
    Answer-Object intializers
  9. Consider the below code segment:
    public static void Main()
    {
    int[][] arr=new int[3][];
    arr[0] = new int[] { 1, 2 };
    arr[1] = new int[] { 3, 4, 5);
    arr[2] = new int[] { 6, 7, 8,6};
    for (int i = 0; i < 2; i++)
    {
    for (int x = 0; x <= arr[i].Length-1; x++)
    {
    Console.Write(arr[i][x]);
    3
    Console.WriteLine(” “);
    } Console.Read();
    A.12 345 6786
    B.12 345
    C.12 345 678
    D.12 34 67
    Answer -12 345
  10. attacks exploit vulnerabilities in Web page validation by
    injecting client-side script code.
    Choose most appropriate option.
    A.Java Script
    B.SQL Injection
    C.C# Code
    D.Cross-site scripting (XSS)
    Answer-Cross-Site scripting (XSS)
  11. If stri and str2 are references to two strings, then which of the following is the correct way
    to compare the two references?
    Choose most appropriate option
    strcmp(str1, str2)
    A.str1 == str2
    B.str1 is str2
    C.str1 = str2
    D.str1.Equals(str2)
    ANSWER- str1==str2
    6.Sudhir wanted to evaluate scenarios where he might encounter the InvalidCastException. He
    is expecting this exception from the following code:
    int intvar = 2;
    object objvar = (object)intvar;
    short shortvar = (short)objvar;
    Do you think he will get the expected Exception type?
    Choose most appropriate option
    A.Yes
    B.No
    Answer-NO
    7.allows you to index a class, struct or interface in the same way as array.
    Fill in the blank with an appropriate option.
    A.Object Initializer
    B.Delegate
    C.Indexer
    D.Property
    Answer-Object intializers
    8.What is the .NET collection class that allows an element to be accessed using a unique key? Choose most appropriate option.
    ArrayList
    String Collection
    A.X
    B.x
    C.Stack
    D.HashTable
    Answer-Hash Table
    9.Which statement finds the rows in the Employee table that do not have Man
    Click on hyperlink to view the EMP Table.
    Choose most appropriate option.
    A.SELECT EMPNO, ENAME,MGR FROM EMP WHERE MGR IS NULL;
    B.SELECT EMPNO, ENAME,MGR FROM EMP WHERE MGR = NULL;
    C.SELECT EMPNO, ENAME,MGR FROM EMP WHERE MGR CONTAINS NUL
    D.SELECT EMPNO, ENAME,MGR FROM EMP WHERE MGR == NULL;
    ANSWER- A
    10.After understanding following code snippet, Sudhir is to determine the output of the following
    code:
    int[] myarray = new int[3] {20,19,21};
    int[] copyarray= new int[3];
    Array.Copy(myarray, 0,copyarray, 1, 1);
    Console.WriteLine(“{0}-{1}-{2}”, copyarray[0], copyarray[1], copyarray[2]);
    According to you, what should be the output?
    Choose most appropriate option
    A.0-20-0
    B.20-19-0
    C.20-19-21
    D.None of the above, use of unassigned array index results in error.
    Answer- A
  12. For long running tasks it is preferable to create your own threads using
    delegate.
    Choose most appropriate option.
    A.ThreadPulse
    B.ThreadCreate
    C.ThreadPool
    D.Thread Start
    Answer- ThreadStart
    Q. Are the following statements true or false?
    Statement 11 LINQ provides a unified programming model to different data domans for data
    Statement 2: Language integrated query is set of framework features for structured type safe
    quenes.
    Choose most appropriate option.
    Ans. Both statements are true Q. Multiple workspaces can be maintained for a single project in the source control.
    State TRUE or FALSE.
    Ans. False
    Q. Sudhir wanted to evaluate scenarios where he might encounter the InvalidCastException. He is
    expecting this uxception from the following code:
    int intvar 21 object objvar (object)intvar
    short shortvar (shortjob Do you think he will get the expected Exception type?
    Choose most appropriate option
    Ans. No
    Q. Below is the Collection Interface list with their meaning in unorganized order.
    1-Purpose of idctonary:Exposes a method that compares two objects.
    2-Purpose of listiDefines size, enumerators and synchronization methods for at collections.
    3-Purpose of comparer Represents a collection of key-and-value pairs.
    4-Purpose of Icotection Represents a collection of objects that can be individually accessed by index.
    Choose the best option to organize the above collection Interface and its meaning,
    Choose most appropriate option
    Ans.
    Q. For long running tasks it is preferable to create your own threads using
    Choose most appropriate option.
    Ans. Threadcreate
    Q. If str1 and str2 are references to two strings, then which of the following is the correct way to the
    two
    Choose most appropriate option
    Ans. str1.equals(str2)
    Q. Sudhir wanted to evaluate scenarios where he might encounter the InvalidCastException. He is
    expecting this uxception from the following code:
    int intvar 21 object objvar (object)intvar
    short shortvar (shortjob Do you think he will get the expected Exception type?
    Choose most appropriate option
    Ans. No
    Q. After understanding following code snippet, Such is to determine the output of the following
    code:
    int myarray new int[3) (20,19,21) int[] copyarray=new int[3];
    Array.Copy myarray, 0.copyaay, 1, 1); Console.WriteLine(“(0)-(1)-(23”, copyanay(0), copvarray(1),
    copparray(2)
    According to you, what should be the output? Choose most appropriate option
    Ans. None of the above, use of unassigned array of index results in error 1. What are the workflow authoring styles supported by WWF
    Choose two most appropriate option
    a) Base class library
    b) Entity Style
    c) Random Style
    d) Data-driven style
    Answer: a,d
  13. Identify the option which follows the correct order of Action
  14. Obtain the Data source.
  15. Execute the query.
  16. Create the query
    Choose most appropriate option
    a) 1,2,3
    b) 3,2,1
    c) 1,3,2
    d) 3,1,2
    Answer: c
  17. _ is a process in which a Web application accepts data from a user and processes it
    Choose most appropriate option.
    a) Page Init
    b) Page Load
    c) ASP.NET
    d) Page Posting
    Answer: d 4. The class that encapsulates the event information should be derived from __
    Fill in the blank with an appropriate option
    a) System.EventArgs
    b) System.EventHandler
    c) System.Delegate
    d) System.componentModel.EventDescriptor
    Answer: a
  18. What are the different components of LINQ?
    Choose four appropriate options.
    a) LINQ to Objects
    b) LINQ to XML
    c) LINQ to SQL
    d) LINQ to DataSet
    e) LINQ to Datatable
    f) LINQ to DataRow
    Answer: a b c d
  19. The specific protocols and serialization formats that are used to support successful communication with
    the service
    Choose most appropriate option
    a) Operation Contract
    b) Service Contract
    c) Fault Contract
    d) Data Contract
    e) All of the above
    f) None of the above
    Answer: b 7. Consider the enumeration below enum ThreadPriority { Lowest, BelowNormal, Normal, AboveNormal,
    Highest }
    Choose two appropriate options
    a) Threadpriority becomes important only when multiple threads are simultaneously active
    b) Lowest and Highest are not part of this enumeration
    c) A thread’s Priority property determines how much execution time it gets relative to other active
    threads in the operating system
    Answer: a c
  20. In Memory mapping, which class signifies a randomly accessed view of a memory-mapped file
    Choose most appropriate option
    a) MemoryMappedViewStream
    b) MemoryMappedViewAccesser
    c) CreateViewAccessor
    d) MemoryMappedFileView
    e) None of the above
    Answer: b
  21. In WPF, which layout control aligns the child controls to the edges of panel
    Choose most appropriate option
    a) StackPanel
    b) DockPanel
    c) GridPanel
    d) CanvasPanel
    e) None of the above
    Answer: b
  22. A _ expression is an anonymous function that can contain expressions and statements and can also
    be used to create delegates or expression tree types
    Choose the appropriate option a) Join
    b) XML
    c) Data
    d) lambda
    e) SQL
    Answer: d
  23. Which of the below are invalid serialization attributes ?
    Choose two most appropriate options.
    a) XMlRootElement
    b) XmlAttribute
    c) XmlElement
    d) XmlElementName
    Answer: a d
  24. __ provides a means of reading a forward-only stream of rows from a SQL server database.
    Fill in the blank with an appropriate option
    a) SqlDataReader
    b) Dataset
    c) DataTable
    d) Dataview
    Answer: a
  25. During a Jagged Array practice session, Shruthi wrote following code:
    int[][] myarray- new int[][3];
    myarray [0]=new int[3];
    myarray [1]=new int[4];
    myarray [2]=new int[5]; IDE continued to show an error for this Jagged Array construction According to you which line is causing
    this error?
    Choose most appropriate option
    a) int[][]myarray new int[][3];
    b) myarray [0]=new int[3];
    c) myarray [1]=new int[4];
    d) myarray [2]=new int[5];
    Answer: a
  26. Consider the following code and identify the attribute to be added to make the Name a property of
    Employee type in the data contract
    [DataContract]
    Public class Employee
    {
    private string m_Name;
    public string Name { get { return m_Name;} set { m_Name = value; } }
    }
    Choose most appropriate option
    a) [DataMember]
    b) [DataService]
    c) [DataAttribute]
    d) [DataProperty]
    Answer: a
  27. Please select the two correct statements for XML document:
    Choose two appropriate options
    a) XSD is the XML-based alternative of DTDs having the same purpose of DTDs but more powerful and
    extensible b) DTD is the XML-based alternative of XMLs having the same purpose of XMLs but more powerful and
    extensible.
    c) DTD is the older standard. It is most probable that XSD will replace DTD for validating XML
    Documents.
    d) XSD is the older standard. It is most probable that DTD will replace XSD for validating XML
    Documents.
    Answer: a c
  28. Rahul is trying to use StringBuilder class in a program, but he is getting error. To use the StringBuilder
    class which namespace he should include in the program
    Choose most appropriate option
    a) System.String
    b) System.Globalization
    c) System.io
    d) System.Builder
    e) None of the above
    Answer: e
  29. please select the correct task to prevent possible code injections
    choose three appropriate options
    a) Client side validation need to be done by Java Script
    b) Don’t store sensible data into cookies
    c) Don’t use hidden boxes to hold data
    d) Don’t depend on client side javascript validation
    Answer: b c d
  30. Which of the following statement(s) is/are true about the operator overloading?
    Choose most appropriate option
    a) Binary operators can be overloaded
    b) The cast operator cannot be overloaded, but you can define new conversion operators c) Unary operators can be overloaded.
    d) All of the above
    Answer: d
  31. The goal of ____is to decrease the amount of code and maintenance required for data-oriented
    applications
    Choose the appropriate option
    a) LINQ to C#
    b) LINQ to Entities
    c) LINQ to Database
    d) LINQ to XML
    Answer: b
  32. In the .NET Framework, where is the version information of an assembly stored?
    Choose most appropriate option
    a) Manifest
    b) Visual Source Safe
    c) Common type System
    d) Version Control
    Answer: a
  33. Identify drawbacks of the Design Patterns from the below mentioned options
    Choose two appropriate answers
    a) Patterns do not lead to direct code reuse
    b) Patterns are deceptively simple
    c) Teams may not Suffer from pattern overload
    d) Maintainability and reusability
    Answer: a b 22. This event is raised by the page object. This event is used to complete all tasks that require
    initialization
    Choose the appropriate option
    a) Prelnit
    b) Preload
    c) Init
    d) Initcomplete
    e) LoadComplete
    Answer: d
  34. A class source-code file that is compiled at run time. These classes can be: HTTP Module, HTTP
    Handler. Can also be a code-behind file for an ASP.NET page or a stand-alone class file containing
    application logic- find the extension of these files above
    Choose most appropriate option
    a) .config
    b) .cs, .jsl, .vb
    c) .licx, .webinfo
    d) .resources, .resx
    Answer: b
  35. which of the following does an assembly contain ?
    Choose most appropriate option
    a) Manifest type metadata, Resources, MSILcode
    b) Manifest, type metadata
    c) Manifest, type metadata, resources
    d) Manifest
    Answer: a
  36. Which Method is used to create a MemoryMappedViewAccessor that maps to a view of the memorymapped file Choose most appropriate option
    a) MemoryMappedViewAccesser()
    b) MemoryMappedViewStream()
    c) CreateViewAccessor()
    d) CreateMemoryMappedViewAccessor()
    Answer: c
  37. Which of these namespaces handle the following information Language-Country/ Region -Calendars in
    use Format pattern for dates -Currency
    Choose most appropriate option.
    a) System.String
    b) System.Globalization
    c) System.lO
    d) System.Reflection
    Answer: b
  38. WPF Which control n the WPF application has a property GroupName ?
    Choose most appropriate option
    a) CheckBox
    b) RadioButton
    c) ComboBox
    d) All of the above
    Answer: b
  39. In an interview Akshay was asked to evaluate following code and determine the Output.
    class Program
    {
    static Program()
    { int number= 100; int denominator= intParse(“0”); int result = number /denominator; Console writeLine(result); }
    }
    class MyClass { static void Main() { Program program= new Program(); } }
    According to you, what should be the output of this code? Choose most appropriate option
    a) System.DivideByZeroException
    b) System.TypelnitializationException
    c) System.InvalidCastException
    d) There won’t be any exception, result would get printed.
    Answer: b
  40. Shruthi is working as a developer. She has to write the code to Create a ConnectionString. Which of
    the following parameter of ConnectionString she should use to specify the name of the database ?
    Choose two appropriate options.
    a) Provider
    b) Initial Catalog
    c) Database
    d) Data Source
    Answer: b c
  41. Which of the following is/are Statement(s) related to interface ?
    Choose most appropriate option
    a) Interface is a type whose members are all public and abstract by default
    b) Interface itself can inherit other interfaces
    c) To implement an interface, class uses the same syntax that is used for inheritance.
    d) All the above
    Answer: d 31. True/False: XML serializes only the public properties and private fields of an object.
    Choose most appropriate option
    a) TRUE
    b) FALSE
    Answer: b
  42. Refer to the below code and Identify the missing statements.
    [ServiceContract]
    Public interface IHello
    {
    void SayHello(string name);
    }
    Choose most appropriate option.
    a)
    b)
    c)
    d)

[OperationContract] attribute needs to be included about the SayHello method.
[DataMember] attribute needs to be included about the SayHello method.
[ServideContract] attribute needs to be included about the SayHello method.
None of the above.

Answer: a

  1. To execute the below code successfully, which namespace to be included
    Using System;
    class MyClass { static void Main(String[] args) { Parallel.For{21, 31, i => {Console.WriteLine(i);}};} }
    choose most appropriate option
    a)
    b)
    c)
    d)

System.Threading
System.Threading.Tasks
System.Linq
Using System.Collections.Concurrent

Answer: b

  1. Consider the following code and identiry the statements which are true?
    using System; using System.Linq;
    class OrderDemo {Static void Main(){String[] englishletters={“d”, “c”, “a”, “b”};
    var sorted = from englishletter in englishletters orderby englishletter select englishletter;
    foreach(string value in sorted) { Console.WriteLine(value);}}}
    Choose two appropriate options.
    a)
    b)
    c)
    d)

Englishletters is an unsorted array
Sorted is an IEnumerable
The output will be in the descending order
The foreach loop is responsible for sorting the englishletters

Answer: a,b

  1. Which of the following substantiates the use of stored procedure?
    Choose most appropriate option.
    a)
    b)
    c)
    d)

The number of requests between the server and the client is reduced.
The execution plain is stored in the cache after It is executed the first time
.Stored procedures accept parameters.
You can bypass permission checking on stored procedure.

Answer: b

  1. _______ is the process of converting the state od an object into a form that can be
    persisted or transported.
    Fill in the blank with an appropriate option.
    a)
    b)
    c)
    d)

Delegate
Serialization
Events
Object Initalizer

Answer: b

  1. Samriti needs to create a UML Diagram that can depict the user requirements scenarios in which
    your system or application interacts with people, organizations or external systems. Which diagram
    should she be using?
    Choose most appropriate option
    a) Use Case Diagram
    b) Class Diagram c) Object Diagram
    d) Sequence Diagram
    Answer: a
  2. Rohit wanted to print the SQL server name of his system. Which code should use in SQL server
    name?
    Choose two most appropriate options.
    a)
    b)
    c)
    d)

Select @@servername
print@@servername
select@@server
print@@server

Answer: a,b

  1. In WWF, __ is the interaction between the Host processes and a specific activity in an
    specific workflow instance.
    Choose most appropriate option.
    a)
    b)
    c)
    d)

Local Communication
Compensation
Correlation
Serialization

Answer: c

  1. How the rules or conditions expressed in WWF to implement business logic
    Choose most appropriate option
    a) Conditions can be articulated as declarative, or defined in code
    b) Rules consist a condition statement and collections of actions that are not performed based on
    the result of the condition
    c) Rules are expressed as an XML file
    d) a & c
    e) a & b & c
    Answer: d
  2. Which of the following will legally declare a construct and initialize an array?
    Choose most appropriate option.
    a) char myArray[] = {‘a’, ‘b’, ‘c’}; b) char myArray[] = {a ; b; c; );
    c) char myArray[] = {‘a’; ‘b’; ‘c’);
    d) char [ ] myArray= {‘a’, ‘b’, ‘c’};
    Answer: d
  3. Web Server provides a detailed description of the extensions, filters, and script mapping
    Choose the appropriate option
    a)
    b)
    c)
    d)

Internet Server Active Programming Interface (ISAPI}
Internet Served Application Programming Integration (ISAPI)
Internet Server Application Programming Interoperability (ISAPI)
Internet Server Application Programming Interface (ISAPI)

Answer: d

  1. A jagged array is an array of arrays, and therefore its elements are __.
    Fill in the blank with an appropriate option.
    a) Value types
    b) Reference types
    c) Both Value types and Reference types
    Answer: b
  2. Which of the following is true about ADO.NET?
    Choose most appropriate option.
    a)
    b)
    c)
    d)
    e)

ADO.NET is an object oriented set of libraries that allows you to interact with data sources.
ADO.NET classes are found in System.Data.dll.
ADO.NET classes are integrated with XML classes.
ADO.NET contains .NET Framework data provieder for connecting to a database.
All of the above.

Answer: e

  1. Identify the statements which are in Camel Case.
    Choose the two appropriate options.
    a)
    b)
    c)
    d)

Public void Show(string bookName){…}
totalAmount
BlueColor
Public event EventHandler ClickEvent

Answer: a,b

  1. Which of the following are facts about Non-persistence memory mapped files?
    Choose most appropriate option
    a) These files are memory-mapped files that are associated with a source file on a disk.
    b) When the last process has finished working with the file, the data is saved to the source file on
    the disk.
    c) These memory-mapped files are suitable for working with extremely large source files.
    d) These files are suitable for creating shared memory for inter-process communications
    Answer: d
  2. LINQ relied on the concepts of extension of extension methods, anonymous types, anonymous
    methods and _____.
    Fill in the blank with an appropriate option.
    a)
    b)
    c)
    d)

Lambda expressions
Xml expressions
Data expressions
Sql expressions

Answer: a

  1. What are the services will be provided by Windows Workflow – Foundation?
    Choose two most appropriate option
    a)
    b)
    c)
    d)

Transaction Services
Migration Services
Scheduling Services
Security services

Answer: a,c

  1. Are the following statements true or false?
    Statement 1: A Task is a schedulable unit of work. Statement
    2: Task enqueued to a TaskScheduler.
    a)
    b)
    c)
    d)

Both statements are true.
Both statements are false.
Statement 1 is false and statement 2 is true.
Statement 2 is false and statement 1 is true.

Answer: a

  1. Which of the following apply to constructor?
    Choose three appropriate options.
    a)
    b)
    c)
    d)

Constructors are methods that set the initial state of an object
Constructors cannot return a value, not even void
Constructors can be inherited
If the class does not explicitly declare a constructor, it will default to a no parameter, do
nothing constructor

Answer: a, b, d

  1. What will be the output of the below program using System;
    using System.IO;
    class Program
    { Static void Main(string[] args)
    { StreamWriter sw = File.CreateText(“C:\accenture.txt”);
    try { sw.WriteLine({“Welcome to Accenture”);}
    catch(IOException e){ Console.WriteLine(e.Message);}
    finally{ if(sw != null) sw.Close();}}}
    Choose most appropriate option
    a)
    b)
    c)
    d)

Accenture.txt file is created in C: drive
IOException will be thrown
Unhandled Exception
Compiletime Error

Answer: a

  1. Shruthi is working on the code below. When she executes this code she is facing this error – using
    directive error.
    Which of the option will resolve this error?
    Int[] numbers = new int[7] (0,1,2,3,4,5,6};
    var numQuery = from num in numbers where (num % 2 ) == 0 select num;
    foreach (int num in numQuery) {Console.Write(“{0}”, num);} Choose most appropriate option
    a)
    b)
    c)
    d)

She must use the System.Linq namespace
She must use the System.Linq.Expressions namespace
She must revise her LInq query
None of the above

Answer: a

  1. With respect to generic concept, developers can create which generic item?
    Choose three appropriate options.
    a)
    b)
    c)
    d)

Generic constant
Generic class
Generic event
Generic delegate

Answer: b,c,d

  1. Radha wants to sort data stored in an array. She doesn’t want to work on the sorting functionality.
    Do we have any provision in the .NET framework FCL to help her in sorting?
    Choose most appropriate option
    a)
    b)
    c)
    d)

Yes, she can use System.Sory(array)
Yes, she can use System.Data.Sort(array)
Yes, she can use System.Array.Sort(array)
No, she need to write the sort functionality

Answer: c

  1. Error handling in WCF service is handled by ___.
    Choose most appropriate option.
    a)
    b)
    c)
    d)

Fault Contract
ServiceContract
DataContract
MessageContract

Answer: a

  1. Which of the options is valid with respect to below statements
    Statement1: StringBuilder saves time and memory by not creating a new string each time an operation is
    performed on a string. Statement2: System.Math class provides constants and static methods for trigonometric, logarithmic,
    and assertion functions.
    Choose most appropriate option.
    a)
    b)
    c)
    d)

Statement1 is True. Statement2 is false
Statement1 is False. Statemetn2 is True
Statement1 is False. Statement2 is False
Statement1 is True. Statement2 is True

Answer: a

  1. Identify correct syntax for declaring indexer.
    Choose most appropriate option.
    a)
    b)
    c)
    d)

public int this[int index] { get{ } set{ } }
public int [int index]this { get{ } set{ } }
public this[int index] { get{ } set{ } )
public this[int index] int { get{ } set{ } )

Answer: a

  1. A/An _____ that does not have a WHERE clause produces the Cartesian product of
    the tables involved in the join.
    Choose the appropriate option
    a) Equi Join
    b) Inner Join
    c) Self Join
    d) Cross Join
    Answer: d
  2. Arun wants to retrieve result using a query “select count(*) from employee”. Which is most
    appropriate SqlCommand method for his requirement
    Choose most appropriate option
    a)
    b)
    c)
    d)

Execute Reader
ExecuteQuery
ExecuteNonQuery
ExecuteScalar

Answer: d

60. CREATE VIEW [dbo].[viewmyTable] AS SELECT D.DeptName, D.Location, E.Name FROM Department
D LEFT OUTER JOIN Employee E ON D.DeptID = E.DeptID GO
Predict the output, when the above query executed?
Choose most appropriate option
a) Commands execute successfully
b) Incomplete query
c) Syntax error
Answer: a

  1. Which of the following are True for Workspace
    Choose two appropriate options
    a) Workspace is a folder created within the local system which maps a project in the source control.s
    b) Files within the source control which needs changes, should be first loaded into the workspace of the
    local system. Any changes made to the files are stored in the local workspace.
    c) Only one workspace can be maintained for a single project in the source control.
    d) Files need to be checked-out in order to upload changes into source control.
    Answer: a,b
  2. Visibility qualifier is used for which off the following?
    Choose most appropriate option.
    a) Specifying different visibility for the get and set accessors of a property or an indexer.
    b) Setting the visibility off the accessor get and set to public even though the property visibility is set to
    protected.
    c) Setting the visibility of the accessor and set to public even though the property visibility is set to
    internal.
    d) All off the above.
    Answer:a
    63.Select the two correct two statements for xml schema(XSD)
    Choose most appropriate option.
    a) The elements is the root element for XSD. b) Has data types and namespaces,like DTDs.
    c) Elements in schemas are divided into three types: Simple Elements Mixed Elements Complex
    Elements.
    d) XSD is written similarly to xml as xsd makes use of xml syntax, hence most of the rules to xml
    apply to xsd.
    Answer:a,d
  3. State true or false for the statements for design patterns.
    Statement 1: Prototype-A fully initialized instance to be copied or cloned.
    Statement 2: Singleton-A class of which only a multiple instances can exist.
    Choose most appropriate option.
    a) All the statements are true.
    b) All the statements are false.
    c) Statement1 is true and statement2 is false.
    d) Statement2 is true and statement1 is false.
    Answer: c
    65.What is the .NET Collection class that allows an element to be accessed using a unique key?
    Choose most appropriate option.
    a) Arraylist
    b) StringCollection
    c) Stack
    d) Hashtable
    Answer: d
  4. Rajesh needs to copy only specific range of elements from MyArray to copyMyArray. He is using
    Follwing code.
    Int[] myarray= new int[3] {20,19,21};
    Int[] copyarray= new int[3];
    Array.Copy(myarray,copyarray,1); Would this code give him desirable Output?
    Choose most appropriate option.
    a)Yes
    b)No
    Answer:a
  5. Consider the following statements and identify the WCF program 1,These are programs that
    consume the services 2.They are normally the ones the initiate the messaging to the service.
    Choose most appropriate option.
    a) Message
    b) Client
    c) Intermediates
    d) None of the option
    Answer:b
    68.Which of the bbelow syntax is correct to define operator method or to perform operator
    overloading?
    Choose most appropriate option.
    a) Public static op(arglist) {}
    b) Public static returnvalue op(arglist){}
    c) Public static returnvalue operator op(arglist){}
    d) All of the above
    Answer:c
  6. Identify two conditions from the following that need to be met for multicast delegates.
    Choose most appropriate option.
    a)None off the parameters of the delegate is an output parameter.
    b)The return type of the delegate is void.
    c)The parameter o the delegate is an output parameter Answer:a,b
  7. What is /are the different component(s) off LINQ?
    Choose most appropriate option.
    a) LINQ to Objects
    b) LINQ to XML
    c) LINQ to SQL
    d) LINQ to Entity
    e) All of the above
    Answer: e
    71.Identify the description of @@IDENTITY.
    Choose most appropriate option.
    a) Returns the error number for the last Transact-SQL statement executed.
    b) Returns the last –inserted identity value.
    c)Returns the number of rows affected by the last Statement.
    Answer:b
    72.Identify the list off Common Exception Classes
    Choose most appropriate option.
    a)
    b)
    c)
    d)
    e)

System.StackException
Syystem.NullReferenceException
System.ArrayTypeMismatchException
System.TypeMisMatchException
System.InvvalidCastException
Answer:b,c,e

  1. Read the statement below and identify the workflow component This is the act of undoing any
    actions that were performed by a successfully completed activity because of an exception that occurred
    elsewhere in a workflow
    Choose most appropriate option.
    a) Activity b) Compensation
    c) Service
    d) Workflow persistence
    Answer:b
  2. John is developing an application for ABC company in which he wants to combine application UIs,2D
    graphics,3D graphics, documents and multimedia is one single framework. Which component can he
    use?
    Choose most appropriate option.
    a)WPF
    b)WCF
    c)Linq
    d)OOPS
    Answer: a
    75.What is/are the advantages of LINQ over stored procedures?
    Choose most appropriate option.
    a)Debugging- it is really very hard to debug the stored procedure but as LINQ is part off .NET, you can
    use visual studio’s debugger to debug the queries.
    b)Deployment- With stored procedures, we need to provide an additional script for stored procedures
    but with LINQ everything gets compiled into single DLL hence deployment becames easy.
    c)Type Safety- LINQ is type safe, so queries errors are type checked at compile time.it is really good to
    encounter an error when compiling rather than runtime exception
    d)All off the above
    Answer: d
  3. which of the below are valid Statements about DataReader and Data set
    Choose most appropriate option.
    a) DataReader reads all the the records at a time and it is used in multiple databbbases.
    b) DataSet always reads one record at a time and it moves into a forword direction. c) DataReader is a connected Architecture
    d) Dataset is a collection of in memory tables
    Answer:c,d
  4. Identiffy the functions of common type System(CTS)
    Choose most appropriate option.
    a) They form the fundamental unit off deployment, version control, reuse, activation scoping, and
    security permissions
    b) Most off the members defined by types in the .NET framework class Library are CLS-compliant
    c) Establishes a framework that helps enable cross-Language integration, type safety, and high
    performance code execution
    d) Provides an object –oriented model that supports the complete of many programming
    languages
    Answer:c,d
  5. Identify the tasks a user is able to perform in Source Control Explorer
    Choose most appropriate option.
    a) Create/Rename/Delete files and folders
    b) Check in/out files
    c) Get latest/Specific version
    d) All of the above
    Answer:d
    79.__ Represents the standard input, output, and error streams ffor console applications.
    This class cannot be inherited.
    Fill the blank with appropriate option.
    a) Console class
    b) TextWriter class
    c) Text class
    Answer:a
    80.What is the namespace for “Task” class?
    Choose most appropriate option. a) System.Tasks
    b) System.Threading.Tasks
    C) System.Diagnostiscs.Tasks
    d) System.Dynamic.Task
    Answer:b
    81.State true or false for the below statements.
    Statement1 : Multicast delegates are used extensively in event handling.
    Statement2 : Delegation can be used to define callback methods
    Choose most appropriate option.
    a) Statement1 and Statement2 are true
    b) Statement2 is true and Statement2 is false
    c) Statement1 is true and Statement2 is false
    d) Statement2 and Statement1 are False
    Answer:a
    82.________________namespace provides classes for using a memory mapped ile,which maps the
    contents of a file to an applications logical address space.
    Fill with the most appropriate option.
    a)System.MemoryMappedFile
    b)System.MemoryMappedFiles
    c)System.IO.MemoryMappedFiles
    d)System.IO.Memory
    Answer:c
    83.Identify the WCF contract considering the following statement
  6. WCF contracts defines implicit contracts for built in data types like string and int.
  7. This contract defines which data types are passed to and from the service
    Choose most appropriate option. a) Service Contract
    b) Fault contact
    C) Data Contract
    d) Message contact
    Answer:c
  8. Which of the below statements are correct about Indexers
    Choose most appropriate option.
    a) Indexers are location indicators
    b) Indexers are used to access class objects
    c) Indexer is a form of property and works in same way as a property
    d) a&b
    e) b&c
    f) a,b&c
    Answer:f
    85._________and __________ methods of a delegate helps to process delegate
    asynchronously
    Fill the blank with appropriate option.
    a) BeginInvoke(),EndInvoke()
    b) InvokeBegin(),InvokeEnd()
    c) Begin(),End9)
    d) BeginInvokeDelegate(),EndInvokeDelegate()
    Answer:a
    86.Which option gets the version of the selected file/folder specific to date, changeset, label,or
    workspace version?
    Choose most appropriate option.
    a)GetSpecificFile b)GetLatestVersion
    c)GetSelectVersion
    d)GetSpecificVersion
    Answer:d
    87.All query operations of LINQ consist of three district actions
    Choose most appropriate option.
    a)
    b)
    c)
    d)
  9. Obtain the data source 2. Declare the Data source 3.Excute the data source
  10. Declare the data source 2.Initialize the query 3. Execute the query
  11. Declare the Data source 2. Create the data source 3 .Execute the Data source
  12. Obtain the data source 2.Create the query 3. Execute the query
    Answer:d

88.Rajesh is implementing an ASP.NET page. The page include a method named GetProjectAllocation
that returns dataset. The Dataset includes a datatable named ProjectAllocation. Rajesh need to show
the data in GridView control named GridView1
Choose most appropriate option.
a)Gridview1.DataTable=GetProjectAllocation();
b)GridView1.DataTable=GetProjectAllocation();GridView1.DataBind();
c) GridView1.DataSource=GetProjectAllocation();GridView1.DataBind();
d) GridView1.DataSourceId=GetProjectAllocation();GridView1.DataBind();
Answer:c
89._____________is a pre defined, reusable routine that is stored in adatabase
Fill the blank with most appropriate option.
a) Function
b) Stored Proccedure
c) View
d) Joins
Answer:b
90.Which of the following are True for Workspace

Choose two appropriate options
a) Workspace is a folder created within the local system which maps a project in the source control.s
b) Files within the source control which needs changes, should be first loaded into the workspace of the
local system. Any changes made to the files are stored in the local workspace.
c) Only one workspace can be maintained for a single project in the source control.
d) Files need to be checked-out in order to upload changes into source control.
Answer: a,b

  1. In LINQ , all the core types are defined in _
    Choose most appropriate option.
    a) System.Linq.XML and System.Linq.Expressions
    b) System.Linq and System.Linq.XML
    c) System.Linq and System.Linq.Expresssions
    d) System.XML.Linq and System.Linq.Expressions
    Answer : C
  2. The _ hosting option is integrated with ASP.NET and uses the features these technologies
    offer, such as process recycling , idle shutdown ,process health monitoring , and message based
    activation.
    Choose most appropriate option
    a) IIS
    b) Windows Services
    c) WAS
    d) Self Hosting
    e) All of the above
    f) None of the above
    Answer : A
  3. What are true about Static Constructors
    Choose two appropriate options
    a) Static variable get instantiated after the static constructor
    b) Static constructors provide the flexibility of statically initializing static variables
    c) Static constructors have access to static members of theirs class only
    d) A static constructors does not have parameters and access modifiers cannot be applied to it
    Answer : C, D
  4. Which of the below statement(s) are valid in Operator Overloading?
    Choose most appropriate option
    a) The conditional logical operators cannot be overloaded
    b) The array indexing operator can be overloaded c) The comparison operators cannot be overloaded
    d) All of the above
    e) None of the above
    Answer : A
  5. You want to make a configuration setting change that will affect only the current web
    application. Which file will you change?
    Choose most appropriate option
    a) Web.config
    b) Machine.config
    c) Global.asax
    Answer : A
  6. Testing which attribute should be used to run code before the first testis run in the class?
    Choose most appropriate option
    a) TestInitialze()
    b) TestClass()
    c) ClassInitialize()
    d) TestStart()
    Answer : C
  7. VSTS is also used for automated unit testing of components and regression testing.
    State TRUE or FALSE
    a) FALSE
    b) TRUE
    Answer : TRUE
  8. Which access modifier cannot be used with data members of a structure?
    Choose most appropriate option
    a) Public
    b) Protected
    c) Internal
    d) Private
    Answer : B
  9. Anand has created a master page named Plant.master. the master page uses the following page
    directives.
    <%@ Master Language=”c#” Src=”~/Plant.master.cs” inherits=”Plant” %>
    He needs to create a content page that uses the master page as a template. In addition , he
    needs to use a single master page for all devices that access the web site. Which code segment
    should be use ?
    Choose most appropriate option a)
    b)
    c)
    d)

<%@ Page Language=”c#” Theme=”Plant” Skin=”Plant.cs”%> <%@ Page Language=”c#” MasterPageFile=”~/Plant.master” %> <%@ Page Language=”c#” device:MasterPageFile=”~/Plant.master” %> <%@ Page Language=”c#” de:MasterPageFile=”~/Plant.master” %>

Answer : B
100.
CREATE VIEW [dbo].[viewmyTable] AS SELECT D.DeptName , D.Location , E.Name FROM
Department D JOIN Employee E ON D.DeptID = E.DeptID GO Predict the output , when the
above view is executed ?
Choose most appropriate option
a) A view will be created by selecting deptname , location from the department table and
employees name from the employee table .
b) Syntax error
c) Incomplete query
d) A view will be created by selecting deptname , location and name from the department
table.
Answer : A

101.
Are the methods below a valid overload
Public int Sum(ref int a , ref int b)
Public int Sum(out int a , out int b)
Choose most appropriate option
a) Yes
b) No
Answer : No
102.

State true or false for the below statements.

Statements1. Extension Methods: Which gives us the capabilities to asses our own custom
methods to data types without deriving from the base class.
Statement2. Object Initializer: allows you to pass in named values for each of the public
properties that will be used to initialize the object.
Choose most appropriate option
a) Statement 1 and statement 2 are true.
b) Statement 1 and statement 2 are false.
c) Statement 1 is false and statement 2 is true.
d) Statement 2 is false and statement 1 is true.
Answer : A

103.
True/False : Fault Handling is a method of the workflow runtime engine that
synchronously handles the exceptions that occur in the activities
Choose most appropriate option
a) TRUE
b) FALSE
Answer : FALSE
104.
Which of the following are true about Delegates?
Choose three appropriate options
a) A delegate can reference a method only if the signature of the method exactly matches the
signature specified by the delegate type
b) A delegate allows the programmer to encapsulate a reference to a method insidea delegate
object
c) Delegate are similar to function pointers
d) Generally useful way for objects to signal state changes that may be useful to clients of that
object.
Answer : A ,B ,C
105.
Amulya has created following class:
Public class Employee { public int EmployeeCode{ get; set;} public string EmployeeName{get;
set;} public int EmployeeAge{get; set;}}
Please select correct code for initializing an object by using Object initializers.
Choose most appropriate option
a) Employee emp = new Employee(EmployeeCode=111;
EmployeeName=”Raghav” ;EmployeeAge=26;};
b) Employee emp = new Employee{EmployeeCode=111,
EmployeeName=”Raghav”,EmployeeAge=26};
c) Employee emp = new Employee(){EmployeeCode=111;
EmployeeName=”Raghav”;EmployeeAge=26;};
d) Employee emp = new Employee(){EmployeeCode=111,
EmployeeName=”Raghav”,EmployeeAge=26};
Answers : B
106.
Identify which statements are false about windows Presentation foundation(WPF)
Choose two appropriate options
a) Used for standalone and browser hosted applications
b) Uses XAML markup to implement the appearance of an application
c) The service-oriented design results in distributed systems that runs between services and
clients
d) Provides a programming model for building workflow-based applications in windows
Answer: C , D
107.

How do you specify a constraints for the type to be used in a generic class

Choose most appropriate option
a) Class Program where T: MyInterface
b) Class Program : MyInterface
c) Class Program constraint T : MyInterface
d) Class Program where T : MyInterface
Answer: A
108.
VIEW [dbo].[viewmyTable] AS SELECT D.Deptname,D.location ,E.Name FROM
Department D FULL OUTER JOIN Employee E ON D.DeptID = E.DeptID
Whats the output , when the above query is executed?
Choose most appropriate option
a) Display all the employees with their Departments .Output contains
b) The employee names and all the department names present in the database
c) Syntax error
d) Incomplete Query
Answer : A
109.
Which is the top .NET class from which everything is derived?
Choose most appropriate option
a) System.Collections
b) System.Globalization
c) System.Object
d) System.IO
Answer : C
110.
From the following option choose the features of WPF
Choose three appropriate options
a) Rich Composition
b) Seperation of appearance and behavior
c) Resolution dependence
d) Highly customizable
Answer : A , B ,D
111.
WCF host can be IIS or WebService or Console Application
Choose most appropriate option
a) TRUE
b) FALSE
Answer : TRUE
112.
Sam is developing an application in which he wants to use child controls are positioned
by rows and columns . which layout he can use ?
Choose most appropriate option

a)
b)
c)
d)

Grid
Canvas
Dock panel
Stack panel

Answer : A
113.
Identify the code snippet for creating custom exception class
Choose most appropriate option
a) Class CustomException:ApplicationException{}
b) Class CustomException : AppException{}
c) Class ApplicationException : CustomException{}
d) None of the above
Answer : A
114.
Which of the following is true about overloading?
Choose most appropriate option
a) Overloaded methods must change the argument list.
b) Overloaded methods can change the return type.
c) Overloaded methods can change the access modifier.
d) All of the above.
Answer : D

1) Identify the Reference types ?
(Choose two correct options)
a) string
b) delegate
c) enum
d) int
Ans: string, delegate
2) What will the output for the following code ?
class SampleClass
{
public static int GetAdd(int num1,int num2)
{
Console.WriteLine(“Addition is {0}”,(num1+num2));
return (num1 + num2) / 2;
}
public static int GetMul(int Val1,int Val2)
{
Console.WriteLine(“Multiplication is {0}”,(Val1*Val2));
return (Val1 * Val2) / 2;
}
}
class Program
{
delegate int TestDelegate(int n1, int n2);
static void Main(string[] args)

{
TestDelegate testDelegate = null;
testDelegate += SampleClass.GetAdd;
testDelegate += SampleClass.GetMul;
Console.WriteLine(“Final Result {0}”,testDelegate(4,4));
Console.ReadLine();
}
}
Ans:

Addition is 8
Multiplication is 16
Final Result 8

3) What will be the output for the following program?
using System;
class Program
{
static void Main(string[] args)
{
string fruit1 = “Banana”;
string fruit2 = fruit1.Replace(‘a’, ‘e’);
Console.WriteLine(fruit2);
Console.ReadLine();
}
}
Ans : Benene

4) What will be the output for the following program?
using System;
class DynamicDemo
{
static void Main(string[] args)
{
dynamic val1 = 500;
dynamic val2 = “jyothi”;
val2 = val1;
Console.WriteLine(“val1={0},val2={1}”,val1.GetType(),val2.GetType());
Console.ReadLine();
}
}
Ans : val1=System.Int32,val2=System.Int32
5 ) The class which doesn’t allow objects creation, but represents as parent class of child classes, is
known as __
a) Static
b) Sealed
c) Abstract
d) Partial
Ans:
6) Which of the following statements are TRUE about private Assembly?
a. Application which refers private assembly will have its own copy of the assembly
b. There will be only one copy of the assembly and it will be stored in Global assembly cache
options:

a) only a
b) only b
c) Both a and b
d) Neither a nor b
Ans :
7) What will be the output for the following program?
NOTE : Line numbers are only for reference
class Program {
static void Method(int[] num)//line1
{
num[0] = 11;
}
static void Main()
{
int[] numbers = { 1, 2, 3 };
Method(numbers);//line2
Console.WriteLine(numbers[0]);
}
}
Ans : 11
8) What will be the output for the following program?
using System;
class A
{
public A()

{
Console.Write(“Class A” + ” “);
}
}
class B : A
{
public B()
{
Console.Write(“Class B” + ” “);
}
}
class ConstructorChainDemo
{
public static void Main(string[] args)
{
A bobj = new A();
}
}
options:
a) class A class B
b) class B class A
c) class B
d) class A
Ans: class A

9) Consider the following languages specifications which must be met by a programming component to
be re-used across multiple languages:
Instance members must be accessed only with the help of objects
The above specifications is provided by ?
a) Common Language Specifications(CLS)
b) Common Type System(CTS)
c) Attributes
d) JIT Compiler
Ans:
10) Method overloading is a concept related to?
[Choose the most appropriate option]
a) dynamic polymorphism
b) static polymorphism
c) abstract class
d) encapsulation
Ans: static polymorphism
11) What will be the output for the following program?
using System;
class StaticDemo
{
private static int number = 100;
static StaticDemo()
{
number = number + 1;
}
public StaticDemo()

{
number = number + 1;
Console.Write(number + ” ” );
}
}
class NormalConstructionProgram
{
static void Main(string[] args)
{
StaticDemo obj= new StaticDemo();
}
}
options:
a) 100
b) 101
c) 102
d) 103
Ans: 102
12) Which of the following statements are TRUE about generics?
[Choose two correct options]
a) Generics does not need to perform boxing
b) Generics does not need to perform unboxing
c) Explicit typecasting is required in generics
d) a generic declared to hold integer values can hold both integer and string values
Ans:

13) _ class is used to find out object’s metadata i.e, methods, fields, properties at
a) System.Type
b) System.Reflection
c) System.Assembly
d) System.String
Ans: System.Type
14) What will be the output for the following program?
class Test
{
int num1 = 10;
public Test()
{
Console.Write(num1 + ” “);
}
public Test(int num2)
{
Console.Write(num2);
}
}
class program
{
public static void Main()
{
Test obj = new Test();
Test obj1 = new Test(10);

}
}
Ans : 10 10
15) Which of the below option is FALSE related to abstract class?
[Choose most appropriate option]
a) Abstract class can contain constructors
b) Abstract class can be instantiated
c) Abstract class can have abstract and non-abstract methods
Ans: b) Abstract class can be instantiated
16) What will be the output for the following program?
using System.Collections;
using System;
public class program
{
public static void Main(string[] args)
{
ArrayList fruits = new ArrayList(){“Apple”, “Banana”, “Orange” };
fruits.Insert(2, “Grapes”);
fruits.Add(“Bilberry”);
foreach(var item in fruits)
{
Console.WriteLine(item);
}
}
Ans : Apple Banana Grapes Orange Bilberry

17) using System;
class Program
{
static void Method(int[] num)
{
num[0]=11;
}
static void Main()
{
int[] numbers={1, 2, 3};
Method(numbers);
Console.WriteLine(numbers[0]);
}
Options:
a) 11
b) 1
c) compilation error at line 2
d) 11 2 3
Answer: 11
18) Identify the keyword used to specify that the class cannot participate in inheritance?
a) abstract
b) sealed
c) virtual
d) override
Answer: b) Sealed

19) using System;
public class StaticTest
{
static int num1=55;
public void Display(int num)
{
num1 += num;
Console.WriteLine(“Value of num1 is “+ num1);
}
}
public class Program
{
static void Main()
{
StaticTest obj1= new StaticTest();
obj1.Display(18);
StaticTest obj2= new StaticTest();
obj2.Display(20);
}
}
Answer: Value of num1 is 73 Value of num1 is 93
20) using System;
class Program
{
static void Main()

{
int[] first = {6, 7};
int[] second = {1, 2, 3, 4, 5};
second = first;
foreach(int j in second)
{
Console.WriteLine(j);
}
}
}
Answer: Prints 6 7
21) Which access specifier can be accessed anywhere in the Assembly but not outside the Assembly?
a) internal
b) public
c) private
d) protected
Answer: a) internal
22) Which Feature of C# is Demonstrated by the following code ?
using System;
class Employee
{
int id;
public int Id
{
get { return id;}

internal set { id = value;}
}
}
Options:
a) Automatic properties
b) Read only property
c) Abstraction
d) Asymmetric property
Answer: Asymmetric property
23) Predict the output of the following code:
enum Numbers
One=100,
Two, Three
}
class Program
static void Main()
Console.WriteLine((int)Numbers. Three );
Answer : 102
24) What will be the output of following code
int? num= 100; num= nutt
Console.WriteLine(num.GetValueOrDefault()
Answer: 0(zero)
25) class Program
{
static void Method(int[] num) {

num(0] = 11
}
static void Main()
{
Int[] numbers = {1,2,3}
Method(numbers)
Console.WriteLine(number[0]);
}}
Answer – 1 1

26) using System;
class Demo (
static int x;
int y
Demo(){
X++;
Y++;
Console.Write(x +” “ + y + ” “);
}
static void Main(string[] args)
{
Demo d1 = new Demo();
Demo d2 = new Demo();
}
Answer – 1 1 21

27) class Program
{
static void Main()
{
int first = (6, 7);
int[] second = {1, 2, 3, 4, 5);
second = first;
foreach(int j in second)
{
Console.WriteLine(j);
}}}
Answer – 6,7
28) using System:
class Program{
void Method(int a, int b, out int c, ref int d)
{
a = a +1:
b= b+ 2;
c = a + b;
d = c -1;
}
static void Main()
{
int first = 10, second =20, third, fourth = 30 ;
Program p = new Program()

p. Method(first, second, out third, ref fourth);
Console.WriteLine(“{0} (1) (2) (3), first, second,third, fourth);
}}
Answer – 10 20 33 32
29) class Test
{
int num1 = 10;
public Test()
{
Console.Write(num1+” “);
}
public Test(int num2)
{
Console.Write(num2);
}
}
class Program
{
public static void Main()
{
Test obj = new Test():
Test obj1 = new Test(10):
}}
Answer – 10 10

30)using System;
Public class StaticTest
{
Static int num1=55;
Public void Display(int num)
{
num1 += num;
Console.WriteLine(“Value of num1 is “ + num1);
}}
Public class Program
{
Static void Main()
{
Static void main()
{
StaticTest obj1 = new StaticTest();
Obj1.Display(10);
StaticTest obj2 = new StaticTest();
Obj2.Display(20);
}}
Answer – value of num1 is 65 value of num1 is 85

31) using system:
class NamedParameterExample
{

static void Method(int num1, int num2, int num3=30)
{
Console.WriteLine(“num1=(0), num2=(1), num3={2}”, num1, num2, num3);
}
public static void Main()
{
Method(num2: 20, num1: 10, num3:100);
}}
Answer – num1= 10, num2=20,num3=100
32)using System;
Class DynamicDemo
{
Public static void main(string[] args)
{
Dynamic val1 =500;
Dynamic val2=”jyothi”;
Val2=val1;
Console.WriteLine(“val1={0},val2={1}”,val1.GetType(),val2.GetType());
}
}
Answer- val1=System.Int32,val2=System.Int32


Leave a Reply

Your email address will not be published. Required fields are marked *