You are on page 1of 28

1 You are creating a Windows-based appIication that takes age from the user.

The
appIication shouId convert the age from character data type to integer data type. Which of
the foIIowing functions you need to use to accompIish the desired task?
1, Convert.ToInt32 2, convert.ToInt32 3, Parse.ToInt32 4, Convert.ToInt 1
2 The _______ model is based on a real world perception that comprises a collection of objects or
entities and the relationships among these.
1, ER 2, Network 3, Hierarchical 4, Relational 1
3 The ABC University used to offer a course in Visual Basic. However, due to less demand of the
subject, the university dropped the course from its T curriculum. This resulted in modification of
the complete T curriculum. dentify the type of entity that the Visual Basic course is.
1, ndependent entity 2, Dependent entity 3, Weak entity 4, Subentity 1
4 A computer institute offers courses on various programming Ianguages for students. The
students can seIect any number of offered courses. Which type of reIationship exists
between the students and offered courses?
1, One-to-Many
ReIationship
2, Many-to-One reIationship 3, Many-to-Many
ReIationship
4, One-to-One reIationship 3
5 Sam is accessing a table that contains details of all the employees of his organization. He needs to
retrieve the details of those employees who have more than $10000 salary per month. He has
decided to use the PRODUCT relational operator to accomplish this task. However, his manager
has informed him that the use of this relational operator will not give the desired result. Analyze
the situation and provide the operator that Sam should use.
1, PROJECT 2, UNON 3, DVDE 4, RESTRCT 4
6 Smith works as a Manager in TechnoWorld, nc. He manages and evaluates the performance of
his team. dentify the entities and relationship in the given scenario.
1, Entities: Smith, team
Relationship: manage
2, Entities: Smith
Relationship: manage and
evaluate
3, Entities: Smith, team
Relationship: evaluate
4, Entities: Smith, team
Relationship: manage and
evaluate
4
7 Identify the type of reIationship in the foIIowing sentence: Software engineers can work on
various programming Ianguages.
1, One-to-One ReIationship 2, Many-to-One ReIationship 3, One-to-Many ReIationship 4, Many-to-Many ReIationship 4
8 There are _______ types of reIationships that exist between entities. 1, one 2, two 3, three 4, four 3
9 Peter is working as a Senior Software Engineer in NewSol, nc. His Employee D is N0065. He
joined the organization on 19 Aug, 2008. dentify the attributes of the entity instance.
1, Date of joining(19 Aug,
2008), Employee_D(N0065),
and Designation(Senior
Software Engineer).
2, Employee_D(N0065) and
Designation(Senior Software
Engineer).
3, Date of joining(19 Aug,
2008) and
Employee_D(N0065)
4, Employee_D (N0065) 1
10 Peter has been given a task to simplify a database structure. He has to represent the data and the
relationships among them in the form of rows and columns. He has decided to use the Network
model for completing this task. However, his manager has informed him that the use of this model
will not generate the desired result. Analyze the situation and provide the correct model that Peter
should use.
1, Hierarchical model 2, Conceptual model 3, Relational model 4, ER Model 3
11 Sam is working on two tables, Employee Details and Department Details. The Employee Details
table contains employee D, employee name, department D, and designation of all employees.
The Department Details table contains department D and department names. Sam has to retrieve
the name of the department that has the maximum number of employees working. Which operator
should Sam select for the given scenario?
1, Join 2, ntersect 3, Union 4, Product 1
12 Subtypes are connected to the supertype by a relationship known as _________. 1, one-to-one 2, one-to-many 3, many-to-many 4, unnamed 4
13 __________ is a scientific method of breaking down complex table structures into simple table
structures by using certain rules.
1, Normalization 2, Renormalization 3, Functional Dependency 4, Specialization 1
14 When each cell of the table contains precisely one value, the table is said to be in the ______
normal form.
1, first 2, second 3, third 4, Boyce-Codd 1
15 Jim works as a database administrator in TechnoSol, nc. He has a table that contains details of
employees and location of the meetings they have attended in the last one year. Jim has to
normalize the table. The table columns consist the details of Employee D, Department D,
meeting date, and location of the meeting. On analyzing the table he found that meeting date and
location of the meeting columns consist of more than one value in each cell. Jim has decided to
normalize the table by using second normal form. However, his manager has informed him that
using second normal form for the given scenario will not be correct. Analyze the situation and
provide the normal form that Jim should use.
1, BCNF 2, First normal form 3, Second normal form 4, Third normal form 2
16 A table lists the details of all the students studying in an institute. dentify the determinant among
the four columns of the given table. Click the Exhibit button to view the table.
1, Student Name 2, Student Roll Number 3, Student Address 4, Student Fathers' Name 2
17 Which of the following sentences is CORRECT about second normal form? 1, A table is said to be in
second normal form if Boyce-
Codd normal form is applied
to it.
2, A table is said to be in
second normal form when
every attribute in a row is not
functionally dependent on any
particular key.
3,A table is said to be in
second normal form, when
every attribute in a row is
dependent on just part of the
whole key.
4, A table is said to be in second
normal form, when every
attribute in a row is functionally
dependent upon the whole key,
and not just part of the key.
4
18 A table is said to be in _____ normal form when it is in second normal form and every non-key
attribute is functionally dependent only on the primary key.
1, first 2,fourth 3, third 4, Boyce-Codd 3
19 Which of the following processes can increase disk space utilization? 1, Normalization 2, Denormalization 3,Generalization 4, Specialization 2
20 Stella is working on a table that contains the details of students who have appeared for different
course exams. She has to normalize the table. The primary key of the given table is Roll Number
+ Exam Code. On analyzing, Stella found that any modification in Student Name column will lead
to modification in the whole table and Student Name + Exam Code can also be chosen as the
primary key. To avoid this redundancy, which normal form should Stella select? Click the Exhibit
button to view the table.
1, 1NF 2, 2NF 3, 3NF 4, BCNF 4
21 Jim is working on an ER diagram. He has been instructed by his manager to map the given ER
diagram to its corresponding tables. On analyzing the whole ER diagram, he is planning to create
a table called Account Details. However, his colleague has advice him that creating only one table
will not give the desired result. Analyze the given ER diagram and provide the tables that Jim
should create.

Click the Exhibit button to view the figure.


1, Account Details and
Saving Account Details
2, Account Details , Current
Account Details ,and Saving
Account Details
3, Salary Account Details ,
Current Account Details ,and
Saving Account Details
4, Account Details, Salary
Account Details , Current
Account Details ,and Saving
Account Details
4
22 The _________ operator builds a relation from tuples appearing in either or both of the specified
relations.
1, Project 2, Divide 3, Join 4, Union 4
23 The ________ model represents all data in a database as simple tables in the row-column format. 1, Relational 2, Hierarchical 3, Network 4, ER 1
24 Replacing optional attributes with subentities is called __________. 1, denormalization 2, normalization 3, generalization 4, specialization 4
25 Which of the following sentences is NOT correct about normalization? 1, Each table should have an
identifier.
2, Each table should store data
for a single type of entity.
3, There should be atleast one
column that accepts a NULL
value.
4, The repetition of values or
columns should be avoided.
3
26 Which of the following sentences is NOT true about an attribute? 1, t identifies its owner entity. 2, t refers to another entity. 3, t simplifies the description
of an entity.
4, t cannot refer to another
entity.
4
27 The Employee_Details table lists the details of an employee. f Employee D is the primary key,
identify the alternate key in the table?

Click the Exhibit button to view the table.


1, Employee Name 2, Designation Code 3, Email D 4, Phone Number 2
28 n the database structure, a table is called by which of the following name? 1, Cardinality 2, Tuple 3, Relation 4, Degree 3
29 Jack is working on a table that describes salary details of an employee. Which of the columns in
the table will you use to uniquely identify all the rows of the table? Click the Exhibit button to view
the table.
1, Employee D +Account
Number
2, Employee D + Department
D +Account Number
3, Employee D+ Department
D + Designation D
4, Employee D+ Department D
+ Designation D +Account
Number
1
30 Ryan is working on a table containing details of projects that the students have submitted after
completing a course on a specific programming language.
The primary key in the table is Student D + Project Code. Ryan is thinking of applying third normal
form to simplify the table structure. On discussing with his senior, he found that his decision of
selecting the third normal form is not correct. Analyze the given table and identify which normal
form should Ryan select.

Click the Exhibit button to view the table.


1, First Normal Form 2, Second Normal Form 3, Fourth Normal Form 4, Boyce-Codd Normal Form 2
31 John is working on a table that includes the details of employees and their departments. He has to
normalize that table. The primary key of that table is Employee D. Which normal form should he
choose to simplify the table? Click the Exhibit button to view the table.
1, 1NF 2, 2NF 3, 3NF 4, BCNF 3
32 Which of the following commands is used to initiate a chat session in Linux? 1, who 2, talk 3, pine 4, elm 2
33 Joe is communicating with Jack by using the Chat utility of Linux. Now, he wants to end the chat
session. Which of the following commands would help him do so?
1, Ctrl + C keys 2, Ctrl + X keys 3, Ctrl + S keys 4, Ctrl + N keys 1
34 Kim has logged on to the Linux system. She received a query from the customer. To resolve the
query, she has to communicate with the back office. dentify the correct sequence of steps that she
needs to follow to communicate with the back office.
1, 1. dentify the user with
whom she needs to
communicate.
2. Check whether the user is
online and ready to receive
messages.
3. dentify the mechanism for
communication.
4. dentify the contents of the
message.
2, 1. dentify the user with
whom she needs to
communicate.
2. dentify the mechanism for
communication.
3. Check whether the user is
online and ready to receive
messages.
4. dentify the contents of the
message.
3, 1. dentify the mechanism
for communication.
2. dentify the user with whom
she needs to communicate.
3. Check whether the user is
online and ready to receive
messages.
4. dentify the contents of the
message.
4, 1. dentify the contents of the
message.
2. dentify the user with whom
she needs to communicate.
3. Check whether the user is
online and ready to receive
messages.
4. dentify the mechanism for
communication.
1
35 Joe is working on a Linux system. He has to chat with Angela. He first wants to check whether
Angela is online and ready to receive messages. For this, he types the following command at the
shell prompt and presses the Enter key:
who

However, the preceding command displays the list of currently logged on users. This list does not
indicate whether the user is ready to receive messages. dentify the correct command that Joe
should use to accomplish the required task?
1, who -t 2, who -T 3, who -h 4, who -H 2
36 Which of the following options is NOT an example of Mail User Agent (MUA)? 1, pine 2, elm 3, mail 4, sendmail 4
37 Which of the following statements is a function of Mail User Agent (MUA)? 1, MUA deciphers the
recipient's address and
delivers the mail to the
recipient's mailbox.
2, MUA manages the sending
and receiving of mails.
3, MUA displays a failure
message if there is any
problem in delivering the mail.
4, MUA is used to read the
message at the recipient's end.
4
38 Jack is working on his Linux system. His boss has sent him a mail that lists the tasks to be
performed by Jack. Jack has to access his inbox to read the new mails received on his Linux
system. dentify the correct sequence of steps that Jack needs to follow to read the new mails.
1, 1. Type pine at the shell
prompt, and press Enter.
2. Press C.
3. Select the relevant mail by
using the up and down-arrow
keys.
4. Press Enter.
2, 1. Type pine at the shell
prompt, and press Enter.
2. Press A.
3. Select the relevant mail by
using the up and down-arrow
keys.
4. Press Enter.
3, 1. Type pine at the shell
prompt, and press Enter.
2. Press L.
3. Select the relevant mail by
using the up and down-arrow
keys.
4. Press Enter.
4, 1. Type pine at the shell
prompt, and press Enter.
2. Press .
3. Select the relevant mail by
using the up and down-arrow
keys.
4. Press Enter.
3
39 Julia is logged on to the Linux system. She has to access her nbox to read mails. She invoked the
pine MUA and pressed the S key to display the list of folders. Analyze whether Julia has pressed
the correct key to display the list of folders. f not, provide the correct solution.
1, Yes, Julia has pressed the
correct key.
2, No, Julia needs to press the
L key.
3, No, Julia needs to press the
F key.
4, No, Julia needs to press the
key.
2
40 Which of the following options do you need to press on the main menu of pine to configure the
pine options?
1, S 2, C 3, O 4, P 1
41 You have sent a mail by using the pine utility of Linux. Now, you need to verify whether the mail
has been sent or not. How will you perform this task?
1, By checking the contents
of the sent folder.
2, By checking the contents of
the Folders list.
3, By checking the contents of
the sent-mail folder.
4, By checking the contents of
the nbox.
3
42 You have sent an E-mail to your friend by using the pine utility of Linux. After you have sent the
mail, its copy is saved automatically in the sent-mail folder. Now, you need to verify this by
checking the content of the sent-mail folder. Which of the following sequence of steps do you
follow to perform this task?
1, 1. Press the M key.
2. Select the Folders List
option, and press Enter.
3. Select the sent-mail option
from the Folders List by using
the Tab key, and press Enter.
2, 1. Select the Folders List
option, and press Enter.
2. Press the M key.
3. Select the sent-mail option
from the Folders List by using
the Tab key, and press Enter.
3, 1. Select the Folders List
option, and press Enter.
2. Select the sent-mail option
from the Folders List by using
the Tab key, and press
Enter.
3. Press the M key.
4, 1. Select the sent-mail option
from the Folders List by using
the Tab key, and press Enter.
2. Press the M key.
3. Select the Folders List option,
and press Enter.
1
43 You have a Linux system. You have to send an E-mail to your friend. For this, you performed the
followed steps:
1. Type pine at the shell prompt, and press Enter.
2. Press C.
3. Type the name of the recipient in the To: block, and press Enter.
4. Type the subject in the Subject: block, and press Enter.
5. Type the contents of the mail.
6. Press the Ctrl and C keys to send the e-mail.

However, you are not able to send the e-mail by using the preceding steps. dentify the problem
and provide the correct solution.
1, At step 6, the Ctrl and O
keys should be pressed to
send the E-mail.
2, At step 6, the Ctrl and J keys
should be pressed to send the
E-mail.
3, At step 6, the Ctrl and S
keys should be pressed to
send the E-mail.
4, At step 6, the Ctrl and X keys
should be pressed to send the E-
mail.
4
44 Which of the following statements is NOT the correct file naming guideline of the Linux operating
system?
1, A file name should be
unique within a directory.
2, A file name can have
maximum of 286 characters.
3, A file name can contain
digits, letters, and special
characters except backslash.
4, A file name should typically
reflect the contents of a file.
2
45 Which of the following options do you need to press to switch to the nsert mode and then type the
contents at the current cursor position of the vi editor?
1, i 2, w 3, v 4, s 1
46 You have written a file by using the vi editor. Now, you need to save the file by the name
myfile.txt. Which of the following steps do you need to follow to save the file and close the vi
editor?
1, 1. Press the Esc key.
2. Type :w
/home/Complaints/myfile.txt,
and press Enter.
3. Type :q, and press Enter.
2, 1. Press the Esc key.
2. Type :w
/home/Complaints/myfile.txt,
and press Enter.
3. Type :c, and press Enter.
3, 1. Press the Esc key.
2. Type :s
/home/Complaints/myfile.txt,
and press Enter.
3. Type :c, and press Enter.
4, 1. Press the C key.
2. Type :w
/home/Complaints/myfile.txt,
and press Enter.
3. Type :c, and press Enter.
1
47 Which of the following commands can be used to replace a character at the current cursor position
and switch back to the Command mode?
1, i 2, a 3, R 4, r 4
48 You have opened a file in the vi editor. You have to make some changes in the third line of the
file. The cursor is currently at the end of the second line. To make changes in the third line, you
pressed the k command. However, the cursor moved to the first line instead of the third line.
Analyze the situation and provide the correct command that should have been used to move the
cursor from the second to the third line.
1, You need to press the j
command to move to the
third line.
2, You need to press the h
command to move to the third
line.
3, You need to press the l
command to move to the third
line.
4, You need to press the o
command to move to the third
line.
1
49 You have to view the files stored in the /home/bill directory. You are currently in the bill directory.
Which of the following commands would you use for this purpose?
1, ls 2, ls bill 3, ls /bill 4, ls /home 1
50 There are three files in the /home/math directory. The file names are math001.2009,
math002.2009, and math003.2009. You need to copy all the files in the /home/math directory to
the /home/backup directory. You are currently in the math directory. Which of the following
commands would you use to perform this task?
1, cp
/home/math/math00[1*3].200
9 /home/backup
2, cp
/home/math/math00[1?3].2009
/home/backup
3, cp /home/backup
/home/math/math00[1-3].2009
4, cp /home/math/math00[1-
3].2009 /home/backup
4
51 There is a file named myfile001.txt in the /home/mydir directory. You need to rename the file to
myfile002.txt. You are currently in the mydir directory. For this, you typed the following command
at the shell prompt:
rm /home/mydir/myfile001.txt /home/mydir/myfile002.txt

Analyze and predict whether the preceding command is able to accomplish the required task. f
not, predict the correct command.
1, Yes, the given command
will rename the file.
2, No, the correct command
is:
mv /home/mydir/myfile001.txt
/home/mydir/myfile002.txt
3, No, the correct command
is:
rm myfile001.txt myfile002.txt
4, No, the correct command
is:
cp /home/mydir/myfile001.txt
/home/mydir/myfile002.txt
2
52 ABC Bank is offering personal loans to its customers at reduced interest rates. This offer is valid
for only a limited period. The bank intends to use a software application to record all loan details.
The bank wants that once the offer period ends, the interest rates and other details such as loan
limits are changed to the original values. The bank does not want to modify the complete software
application as a result of change in such loan details. dentify the tier on which the bank should
place such details in order to accomplish their requirement.
1, Client tier 2, Server tier 3, Business tier 4, Database tier 3
53 ___________ provides support for asynchronous communication between clients and the database
server, enabling reliable query processing.
1, Service Broker 2, Full-text Search 3, Replication 4, Notification Services 1
54 Which of the following is NOT a feature of the CLR component of the .NET Framework? 1, Automatic memory
management
2, Support for Web services 3, Standard type system 4, Language interoperability 2
55 Which of the following features of SQL Server 2005 allows you to implement programming logic in
any language supported by the .NET Framework?
1, Service-oriented
architecture
2, Scalability 3, CLR integration 4, Support for data migration
and analysis
3
56 Jonathan is using the ALTER statement on a database that he has created. Under which of the
following options is the statement being used by Jonathan included?
1, Data Manipulation
Language
2, Data Control Language 3, Data Query Language 4, Data Definition Language 4
57 Which of the following mathematical functions provided by SQL Server 2005 returns the largest
integer less than or equal to the specified value?
1, floor 2, power 3, radians 4, Abs 1
58 You need to display a report that includes the Login ds of the employees and their birth dates. You
want that the birth date should be displayed in yy.mm.dd format. Which of the following statements
will you use to accomplish the same?
1, SELECT LoginD,
convert(char,BirthDate) AS
'Birth Date' FROM
HumanResources.Employee
2,SELECT LoginD,
convert(char,BirthDate,2) AS
'Birth Date' FROM
HumanResources.Employee
3, SELECT LoginD,
convert(char(2),BirthDate) AS
'Birth Date' FROM
HumanResources.Employee
4, SELECT LoginD,
convert(BirthDate(2), char(6))
AS 'Birth Date' FROM
HumanResources.Employee
2
59 You need to generate summary rows from a table by using aggregate functions in the query
results. Which of the following options will you use to accomplish the same?
1, COMPUTE 2, GROUP BY 3, COMPUTE BY 4, PVOT 1
60 The _______ join displays the result set containing all the rows from one table and the matching
rows from another table.
1, inner 2, outer 3, cross 4, equi 2
61 Which of the following operator refers to a value that is greater than the maximum value in the
list?
1, >ALL 2, >ANY 3, =ANY 4, <>ALL 1
62 You have to retrieve the details of employees from the Employee table, which contains the EmpD
and EmpTitle columns. You have to write a query that displays Employee D and title under the
column headings, Employee D and Designation, respectively. Which of the following SQL queries
would you use to perform the required task?
1, SELECT EmpD
'Employee D', EmpTitle
'Designation' FROM
HumanResources.Employee
2, SELECT 'Employee D'
EmpD, 'Designation' EmpTitle
FROM
HumanResources.Employee
3, SELECT EmpD =
'Employee D', EmpTitle =
'Designation' FROM
HumanResources.Employee
4, SELECT 'Employee D' AS
EmpD, 'Designation' AS
EmpTitle FROM
HumanResources.Employee
1
63 You have to create a report containing the Employee D, title, and total leaves of those employees
whose total leaves are not greater than 20. Which of the following SQL queries would you use to
create this report?
1, SELECT EmployeeD,
Title, TotalLeaves FROM
HumanResources.Employee
WHERE TotalLeaves > 20
2, SELECT EmployeeD, Title,
TotalLeaves FROM
HumanResources.Employee
WHERE TotalLeaves != 20
3, SELECT EmployeeD, Title,
TotalLeaves FROM
HumanResources.Employee
WHERE TotalLeaves < 20
4, SELECT EmployeeD, Title,
TotalLeaves FROM
HumanResources.Employee
WHERE TotalLeaves <= 20
4
64 You have to retrieve the Name, DepartmentD, and GroupName columns from the Department
table. The data of the Name column should be displayed in capital letters with a user-defined
heading, Department Name. Which of the following SQL queries would you use to retrieve the
required information in the desired format?
1, SELECT upper(Name),
DepartmentD, GroupName
FROM
HumanResources.Departmen
t
2, SELECT 'Department
Name'= Name, DepartmentD,
GroupName FROM
HumanResources.Department
3, SELECT 'Department
Name'= patindex(Name),
DepartmentD, GroupName
FROM
HumanResources.Department
4, SELECT 'Department
Name'= upper(Name),
DepartmentD, GroupName
FROM
HumanResources.Department
4
65 You need to create a report containing the product D along with their list prices. The products
should be ranked based on their list price. The product with the highest value of list price should be
given the rank as 1. n addition, if two products have the same list price, they should be given the
same rank. However, the next product in the order of list price would be assigned the next rank
value. Which of the following SQL queries would you use to retrieve the required report?
1, SELECT Productd,
ListPrice, rank()
OVER(ORDER BY ListPrice
desc) AS rank
FROM Production.Product
2, SELECT Productd,
ListPrice, dense_rank()
OVER(ORDER BY ListPrice
desc)AS rank
FROM Production.Product
3, SELECT Productd,
ListPrice, row_number()
OVER(ORDER BY ListPrice
asc) AS rank
FROM Production.Product
4, SELECT Productd, ListPrice,
rank() OVER(ORDER BY
ListPrice asc) AS rank
FROM Production.Product
2
66 You have to display a report that contains the Employee D and the name of department for each
employee. The Employee D is stored in the EmployeeDepartmentHistory table, and the
department name is stored in the Department table. The Department and
EmployeeDepartmentHistory tables contain a common column, DepartmentD. Which of the
following SQL queries would you use to display the required report?
1, SELECT e.EmployeeD,
d.Name FROM
HumanResources.Departmen
t d
JON
HumanResources.Employee
DepartmentHistory e
ON e.DepartmentD =
d.DepartmentD
2, SELECT e.EmployeeD,
d.Name FROM
HumanResources.Department
d OUTER JON
HumanResources.EmployeeD
epartmentHistory e
ON e.DepartmentD =
d.DepartmentD
3, SELECT e.EmployeeD,
d.Name FROM
HumanResources.Department
d
EQU JON
HumanResources.EmployeeD
epartmentHistory e
ON e.DepartmentD =
d.DepartmentD
4, SELECT e.EmployeeD,
d.Name FROM
HumanResources.Department d
CROSS JON
HumanResources.EmployeeDe
partmentHistory e
ON e.DepartmentD =
d.DepartmentD
1
67 You have to create a report that displays the number of years an employee has been working with
the organization. For this, you created the following SQL query:

SELECT datepart (yy, HireDate, getdate()) AS 'Age'


FROM HumanResources.Employee

However, the preceding query does not compile. dentify the reason and provide the correct
solution.
1, SELECT datepart (yy,
HireDate) AS 'Age'
FROM
HumanResources.Employee
2, SELECT datediff (yy,
HireDate, getdate()) AS 'Age'
FROM
HumanResources.Employee
3, SELECT dateadd (yy,
HireDate, getdate()) AS
'Age'
FROM
HumanResources.Employee
4, SELECT day (HireDate) AS
'Age'
FROM
HumanResources.Employee
2
68 You have to create a report that displays the EmployeeD of all the employees, who live in the
Bothell city, from the EmployeeAddress table. For this, you created the following SQL query:

SELECT EmployeeD FROM HumanResources.EmployeeAddress WHERE AddressD


= (SELECT AddressD FROM Person.Address WHERE City = 'Bothell')

However, the preceding query gives an error "Subquery returned more than 1 value". Provide the
correct solution for this problem.
1, SELECT EmployeeD
FROM
HumanResources.Employee
Address WHERE
AddressD
N (SELECT AddressD
FROM Person.Address
WHERE City = 'Bothell')
2, SELECT EmployeeD
FROM
HumanResources.EmployeeAd
dress WHERE AddressD
EXSTS (SELECT AddressD
FROM Person.Address
WHERE City = 'Bothell')
3, SELECT AddressD FROM
Person.Address WHERE City
= 'Bothell'
4, SELECT EmployeeD FROM
HumanResources.EmployeeAd
dress e JON Person.Address a
ON e.AddressD=a.AddressD
1
69 You have to create a report that displays the Employee D and the title of all the employees whose
sick leave hours are more than the sick leave hours of employees designated as Stocker. For this,
you used the following SQL query:

SELECT EmployeeD, Title, SickLeaveHours


FROM HumanResources.Employee
WHERE SickLeaveHours >ANY (SELECT SickLeaveHours
FROM HumanResources.Employee WHERE Title ='Stocker')

Analyze and predict whether the preceding query would display the required report. f not, provide
the correct solution.
1, Yes, the query will display
the required report.
2, No, the correct query is:
SELECT EmployeeD, Title,
SickLeaveHours
FROM
HumanResources.Employee
WHERE SickLeaveHours
>ALL (SELECT
SickLeaveHours
FROM
HumanResources.Employee
WHERE Title ='Stocker')
3, No, the correct query is:
SELECT EmployeeD, Title,
SickLeaveHours
FROM
HumanResources.Employee
WHERE SickLeaveHours
<>ALL (SELECT
SickLeaveHours
FROM
HumanResources.Employee
WHERE Title ='Stocker')
4, No, the correct query is:
SELECT EmployeeD, Title,
SickLeaveHours
FROM
HumanResources.Employee
WHERE SickLeaveHours =ANY
(SELECT SickLeaveHours
FROM
HumanResources.Employee
WHERE Title ='Stocker')
2
70 You have to create a report that displays the EmployeeD of those employees whose sick leave
hours are greater than the average sick leave hours of employees with title as 'Network
Administrator'. For this, you used the following SQL query:

SELECT Employeed FROM HumanResources.Employee WHERE SickLeaveHours


= (SELECT AVG(SickLeaveHours) FROM HumanResources.Employee
WHERE Title = 'Network Administrator')

Analyze and predict whether the preceding query would display the required report. f not, provide
the correct solution.
1, Yes, the query will display
the required report.
2, No, the correct query is:
SELECT Employeed FROM
HumanResources.Employee
WHERE SickLeaveHours >
(SELECT
AVG(SickLeaveHours) FROM
HumanResources.Employee
WHERE Title = 'Network
Administrator')
3, No, the correct query is:
SELECT Employeed FROM
HumanResources.Employee
WHERE
Avg(SickLeaveHours) >
(SELECT SickLeaveHours
FROM
HumanResources.Employee
WHERE Title = 'Network
Administrator')
4, No, the correct query is:
SELECT Employeed FROM
HumanResources.Employee
WHERE SickLeaveHours =
(SELECT SickLeaveHours
FROM
HumanResources.Employee
WHERE Title = 'Network
Administrator')
2
71 You have to create a report that displays all the titles of the employees along with their average
sick leave hours when the sick leave hours are more than 20 and the group average value is
greater than 35. For this, you used the following SQL query:

SELECT Title, 'Average Sick Leave Hours' = avg(SickLeaveHours) FROM


HumanResources.Employee WHERE SickLeaveHours > 20 GROUP BY Title

Analyze and predict whether the preceding query would display the required report. f not, provide
the correct solution.
1, Yes, the query will display
the required report.
2, No, the correct query is:
SELECT Title, 'Average Sick
Leave Hours' =
avg(SickLeaveHours) FROM
HumanResources.Employee
WHERE SickLeaveHours > 20
AND avg(SickLeaveHours)
>35
3, No, the correct query is:
SELECT Title, 'Average Sick
Leave Hours' =
avg(SickLeaveHours) FROM
HumanResources.Employee
WHERE
avg(SickLeaveHours) >55
4, No, the correct query is:
SELECT Title, 'Average Sick
Leave Hours' =
avg(SickLeaveHours) FROM
HumanResources.Employee
WHERE SickLeaveHours > 20
GROUP BY Title HAVNG
avg(SickLeaveHours) >35
4
72 Which of the following databases acts as a template or a prototype for the new databases in SQL
Server 2005?
1, master 2, model 3, msdb 4, Resource 2
73 What is the extension of the primary data file in SQL Server 2005? 1, .mdf 2, .ndf 3, .ldf 4, .sql 1
74 Which of the foIIowing stored procedures is used to rename a database in SQL Server
2005?
1, sp_name 2, sp_heIpdb 3, sp_rename 4, sp_renamedb 4
75 The ____________ statement is used to delete a database when it is no longer required. 1, DROP DATABASE 2, DELETE DATABASE 3, ALTER DATABASE 4, DROP DB 1
76 Which of the following functions provided by the XML data type of the SQL Server is used to add
nodes to XML in an XML column or variable?
1, query 2, value 3, modify 4, exist 3
77 You are creating an Employee table in SQL Server 2005. The table contains the EmpPhone
column to store the phone numbers of the employees. You need to ensure that the phone number
entered by the employee should not be less 10 digits. Which of the following constraints would you
apply on the EmpPhone column to accomplish this task?
1, Foreign Key 2, Check 3, Unique 4, Default 2
78 The Employee table in SQL Server 2005 contains the details about employees working in an
organization. According to certain new requirements, you have to add another column for storing
PAN card details of each employee in the Employee table. Which of the following statements
would you use to implement this change in the Employee table?
1, ALTER TABLE 2, DROP TABLE 3, CREATE TABLE 4, TRUNCATE TABLE 1
79 The details about various products are stored in the Products table. The price of one of the
products has changed. You need to reflect this change in the Products table. Which of the
following statements allows you to perform this task?
1, UPDATE 2, ALTER 3, NSERT 4, SELECT 1
80 An XML document needs to be shredded in order to store it in a database table. Which of the
following tasks is NOT a part of shredding the XML document?
1, Parse the XML document 2, Retrieve a rowset from the
tree
3, Delete the data from the
rowset
4, Clear the memory 3
81 You have to retrieve the relational data from the Products table into the XML format for reporting
purposes. For this, you want to write a Select query that returns the result in the form of nested
XML elements. Which of the following modes of the FOR XML clause would you use to retrieve
the XML data in the required format?
1, RAW 2, AUTO 3, PATH 4, EXPLCT 2
82 You have to create the Orders table in the database. The table contains three columns: OrderD,
OrderDate, and OrderPrice. The OrderD column cannot be left empty while inserting data in the
table. Which of the following statements would you use to create the Orders table?
1, CREATE TABLE Orders
(
OrderD int NOT NULL,
OrderDate datetime,
OrderPrice int
)
2, CREATE TABLE Orders
(
OrderD int NOT NULL,
OrderDate datetime,
OrderPrice int,
)
3, CREATE TABLE Orders
(
OrderD int,
OrderDate datetime,
OrderPrice int
)
4, CREATE TABLE Orders
(
OrderD int NULL,
OrderDate datetime,
OrderPrice int
)
1
83 You have to create the EmpPayDetails table in the database. This table contains the personal
details of the employees and their payment rates. Whenever there is a change in the payment rate
of an employee, a separate record is inserted in the RateChangeDate column. The EmpPayDetails
table needs to be partitioned based on the changes made in the payment rates of employees. For
this, you have created a partition function and associated it with various filegroups by using the
partition scheme named RateChngDate. Which of the following statements would you use to
create the table that will store the partitioned records?
1, Create Partition Table
EmpPayDetails
(
EmployeeD int,
RateChangeDate datetime,
Rate money,
PayFrequency tinyint,
ModifiedDate datetime
)ON
RateChngDate(RateChangeD
ate)
2, Create Table
EmpPayDetails
(
EmployeeD int,
RateChangeDate datetime,
Rate money,
PayFrequency tinyint,
ModifiedDate datetime
)ON
RateChngDate(RateChangeDa
te)
3, Create Table
EmpPayDetails
(
EmployeeD int,
RateChangeDate datetime,
Rate money,
PayFrequency tinyint,
ModifiedDate datetime
)ON RateChngDate
4, Create Table
EmpPayDetails
(
EmployeeD int,
RateChangeDate datetime,
Rate money,
PayFrequency tinyint,
ModifiedDate datetime
)ON
RateChangeDate(RateChngDat
e)
2
84 You have to store the data in the following columns of the Address table in the database:

AddressD
AddressLine1
AddressLine2
StateProvinceD
PostalCode

Which of the following statements would you use to perform this task?
1, NSERT Address
(AddressD, AddressLine1,
AddressLine2,
StateProvinceD,
PostalCode)
VALUES (104, '24, Herbon
Apts',' Arthor Lane', 56,
'607009')
2, NSERT NTO Address
(104, '24, Herbon Apts',' Arthor
Lane', 56, '607009')
3, NSERT VALUES (104, '24,
Herbon Apts',' Arthor Lane',
56, '607009')
4, NSERT Address
VALUE (104, '24, Herbon Apts','
Arthor Lane', 56, '607009')
1
85 You have received the order details from a vendor in an XML document. This XML data needs to
be stored in a database table. For this, you need to shred the XML document by using the
OPENXML function. dentify the correct sequence of tasks that you need to perform to shred the
XML document.
1, 1. Parse the XML
document.
2. Store the data from the
rowset.
3. Retrieve a rowset from the
tree.
4. Clear the memory.
2, 1. Store the data from the
rowset.
2. Parse the XML document.
3. Clear the memory.
4. Retrieve a rowset from the
tree.
3, 1. Parse the XML
document.
2. Retrieve a rowset from the
tree.
3. Store the data from the
rowset.
4. Clear the memory.
4, 1. Clear the memory.
2. Store the data from the
rowset.
3. Parse the XML document.
4. Retrieve a rowset from the
tree.
3
86 You have written the following statements to retrieve details of employees with Employee D as 1
or 2:

SELECT EmployeeD, ContactD, LoginD, Title


FROM HumanResources.Employee
WHERE EmployeeD=1 OR EmployeeD=2
FOR XML RAW

Predict the output of the preceding query.


1, <row EmployeeD="1"
ContactD="1209"
LoginD="adventure-
works\guy1"
Title="Production Technician -
WC60" />
<row EmployeeD="2"
ContactD="1030"
LoginD="adventure-
works\kevin0"
Title="Marketing Assistant" />
2, <row>
<EmployeeD>1</EmployeeD
>
<ContactD>1209</ContactD>

<LoginD>adventure-
works\guy1</LoginD>
<Title>Production Technician -
WC60</Title>
</row>
<row>
<EmployeeD>2</EmployeeD
>
<ContactD>1030</ContactD>

<LoginD>adventure-
works\kevin0</LoginD>
<Title>Marketing
Assistant</Title>
</row>
3, <Employee
EmployeeD="1"
ContactD="1209"
LoginD="adventure-works\
guy1" Title="Production
Technician - WC60" />
<Employee EmployeeD="2"
ContactD="1030"
LoginD="adventure-works\
kevin0" Title="Marketing
Assistant" />
4, <Employee>
<EmployeeD>1</EmployeeD>

<ContactD>1209</ContactD>

<LoginD>adventure-
works\guy1</LoginD>
<Title>Production Technician -
WC60</Title>
</Employee>
<Employee>
<EmployeeD>2</EmployeeD>

<ContactD>1030</ContactD>

<LoginD>adventure-
works\kevin0</LoginD>
<Title>Marketing
Assistant</Title>
</Employee>
1
87 How many clustered indexes can be created on a table? 1, 1 2, 2 3, 4 4, 249 1
88 Which of the following constructs is used in a batch to allow a set of T-SQL statements to execute
repeatedly as long as the given condition holds true?
1, F...ELSE 2, CASE 3, WHLE 4, FOREACH 3
89 Which of the following data types can be returned by a scalar function in SQL Server 2005? 1, text 2, ntext 3, cursor 4, float 4
90 Which of the following types of triggers is fired after the execution of the DML operation for which
it has been defined?
1, After Triggers 2, nstead of Triggers 3, Nested Triggers 4, Recursive Triggers 1
91 Which of the following problems occurs in the database when two or more transactions try to
modify the same row?
1, Lost updates 2, Uncommitted dependency 3, nconsistent analysis 4, Phantom reads 1
92 You have to create a clustered index on the Employee table. While creating the index, you need to
reserve a percentage of free space on each data page of the index to accommodate future
expansion. Which of the following options should you use to accomplish this while creating the
clustered index?
1, PAD_NDEX 2, FLLFACTOR 3, ONLNE 4, DROP_EXSTNG 2
93 Which of the following statements is NOT true about XML indexes? 1, XML indexes can be
created only on XML
columns.
2, XML indexes only support
indexing a single XML column.
3,XML indexes can only be
added to tables, views, table-
valued variables with XML
columns or XML variables.
4, XML indexes created on a
table do not allow you to modify
the primary key.
3
94 Which of the following statements is NOT true about batches? 1, When a batch is submitted
to the SQL Server, it is
compiled to create an
execution plan.
2, f any compilation error
occurs, none of the statements
in the batch is executed.
3, You can use the EXECUTE
statement in a batch when it is
not the first statement of the
batch.
4, You can define and use the
CHECK constraint in the same
batch.
4
95 You have to update two tables in a database. For this, you have written two update statements.
You want that both update statements must execute as a single logical unit of work to maintain
data integrity. f any type of error occurs in any of the update statements, none of the statements
should be executed. Which of the following options would you use to implement this?
1, Transaction 2, Batch 3, Trigger 4, Stored Procedure 1
96 You have to set the timeout period of five seconds for a transaction to wait on a blocked resource.
Which of the following statements would you use to accomplish this?
1, SET LOCK_TMEOUT
5000
2, SET LOCK_TMEOUT 500 3, SET LOCK_TMEOUT 50 4, SET LOCK_TMEOUT 5 1
97 dentify the correct sequence of tasks that you need to perform to configure full-text search on a
database.
1, 1. Enable the full-text
search in the database.
2. Create a full-text catalog.
3. Create a unique index.
4. Create a full-text index.
5. Populate the full-text
index.
2, 1. Enable the full-text search
in the database.
2. Create a unique index.
3. Create a full-text catalog.
4. Create a full-text index.
5. Populate the full-text index.
3, 1. Create a full-text
catalog.
2. Enable the full-text search
in the database.
3. Create a unique index.
4. Create a full-text index.
5. Populate the full-text index.
4, 1. Create a full-text index.
2. Create a full-text catalog.
3. Enable the full-text search in
the database.
4. Create a unique index.
5. Populate the full-text index.
1
You have created a view in the database by using the following statements:

CREATE VEW HumanResources.vwEmployeeDepData


AS
SELECT e.EmployeeD, MaritalStatus, DepartmentD
FROM HumanResources.Employee e JON
HumanResources.EmployeeDepartmentHistory d
ON e.EmployeeD = d.EmployeeD

Now, you want to create a clustered index on the vwEmployeeDepData view. For this, you first
need to bind the vwEmployeeDepData view to the schema of the underlying tables. Which of the
following statements would you use to perform this task?
1, CREATE VEW
HumanResources.vwEmploy
eeDepData WTH
SCHEMABNDNG
AS
SELECT e.EmployeeD,
MaritalStatus,
DepartmentD
FROM
HumanResources.Employee
e JON
HumanResources.Employee
DepartmentHistory d
ON e.EmployeeD =
d.EmployeeD
2, ALTER VEW
HumanResources.vwEmployee
DepData WTH
SCHEMABNDNG
AS
SELECT e.EmployeeD,
MaritalStatus, DepartmentD
FROM
HumanResources.Employee e
JON
HumanResources.EmployeeD
epartmentHistory d
ON e.EmployeeD =
d.EmployeeD
3, ALTER VEW
HumanResources.vwEmploye
eDepData WTH SCHEMA
AS
SELECT e.EmployeeD,
MaritalStatus, DepartmentD
FROM
HumanResources.Employee e
JON
HumanResources.EmployeeD
epartmentHistory d
ON e.EmployeeD =
d.EmployeeD
4, SELECT VEW
HumanResources.vwEmployee
DepData WTH
SCHEMABNDNG
AS
SELECT e.EmployeeD,
MaritalStatus, DepartmentD
FROM
HumanResources.Employee e
JON
HumanResources.EmployeeDe
partmentHistory d
ON e.EmployeeD =
d.EmployeeD

The CustomerD attribute of the Customer table is an DENTTY column and its value cannot be
specified while inserting a new record. f anyone specifies the value for the CustomerD in the
NSERT statement, an error will be generated. To handle such errors, you decide to use the TRY
and CATCH blocks. You want that when an error occurs while inserting a record in the Customer
table, the error message along with the line number at which the error occurred should be
displayed. Which of the following statements would you use to perform this task?
1, BEGN TRY
NSERT NTO
HumanResources.Customer

VALUES ('C001', 1979,


'robertl', 16, 'M')
END TRY
BEGN CATCH
SELECT 'There was an error!
' + ERROR_MESSAGE() AS
ErrorMessage,
ERROR_LNE() AS
ErrorLine
END CATCH
GO
2, BEGN TRY
NSERT NTO
HumanResources.Customer
VALUES ('C001', 1979,
'robertl', 16, 'M')
END TRY
BEGN CATCH
SELECT 'There was an error! '
+ ERROR_MESSAGE() AS
ErrorMessage,
ERROR_NUMBER() AS
ErrorLine
END CATCH
GO
3, BEGN TRY
NSERT NTO
HumanResources.Customer
VALUES ('C001', 1979,
'robertl', 16, 'M')
END TRY
BEGN CATCH
SELECT 'There was an error! '
+ ERROR() AS ErrorMessage,
ERROR_NUMBER() AS
ErrorLine
END CATCH
GO
4, BEGN TRY
NSERT NTO
HumanResources.Customer
VALUES ('C001', 1979, 'robertl',
16, 'M')
END TRY
BEGN CATCH
SELECT 'There was an error! '
+ ERROR() AS ErrorMessage,
ERROR_LNE() AS ErrorLine
END CATCH
GO

You have created following stored procedure in SQL Server:

CREATE PROCEDURE prcGetEmployeeDetail @Empd int, @DepName char(50) OUTPUT,


@Shiftd int OUTPUT
AS
BEGN
F EXSTS(SELECT * FROM HumanResources.Employee WHERE EmployeeD = @Empd)
BEGN
SELECT @DepName = d.Name, @Shiftd = h.ShiftD
FROM HumanResources.Department d JON
HumanResources.EmployeeDepartmentHistory h
ON d.DepartmentD = h.DepartmentD
WHERE EmployeeD = @Empd AND h.Enddate S NULL
RETURN 0
END
ELSE
RETURN 1
END

Now, you have to create another procedure that will call the prcGetEmployeeDetail procedure.
Which of the following statements would you use to perform this task?
1, CREATE PROCEDURE
prcDisplayEmployeeStatus
@Empd int
AS
BEGN
DECLARE @DepName
char(50)
DECLARE @Shiftd int
DECLARE @ReturnValue
int
EXEC @ReturnValue =
prcGetEmployeeDetail
@Empd, @DepName
OUTPUT, @Shiftd
OUTPUT
F (@ReturnValue = 0)
BEGN
PRNT 'The details of an
employee with D: ' +
convert(char(10), @Empd)
PRNT 'Department Name: '
+ @DepName
PRNT 'Shift D: ' + convert(
char(1), @Shiftd)
END
ELSE
PRNT 'No records found for
the given employee'
END
2, CREATE PROCEDURE
prcDisplayEmployeeStatus
@Empd int
AS
BEGN
DECLARE @DepName
DECLARE @Shiftd
DECLARE @ReturnValue
EXEC @ReturnValue =
prcGetEmployeeDetail
@Empd, @DepName
OUTPUT, @Shiftd OUTPUT
F (@ReturnValue = 0)
BEGN
PRNT 'The details of an
employee with D: ' +
convert(char(10), @Empd)
PRNT 'Department Name: ' +
@DepName
PRNT 'Shift D: ' + convert(
char(1), @Shiftd)
END
ELSE
PRNT 'No records found for
the given employee'
END
3, CREATE PROCEDURE
prcDisplayEmployeeStatus
@Empd int
BEGN
DECLARE @DepName
char(50)
DECLARE @Shiftd int
DECLARE @ReturnValue
int
EXEC @ReturnValue =
prcGetEmployeeDetail
@Empd, @DepName
OUTPUT, @Shiftd
OUTPUT
F (@ReturnValue = 0)
BEGN
PRNT 'The details of an
employee with D: ' +
convert(char(10), @Empd)
PRNT 'Department Name: ' +
@DepName
PRNT 'Shift D: ' + convert(
char(1), @Shiftd)
END
ELSE
PRNT 'No records found for
the given employee'
END
4, CREATE PROCEDURE
prcDisplayEmployeeStatus
@Empd int
AS
BEGN
DECLARE @DepName
char(50)
DECLARE @Shiftd int
EXEC @ReturnValue =
prcGetEmployeeDetail
@Empd, @DepName
OUTPUT, @Shiftd OUTPUT
F (@ReturnValue = 0)
BEGN
PRNT 'The details of an
employee with D: ' +
convert(char(10), @Empd)
PRNT 'Department Name: ' +
@DepName
PRNT 'Shift D: ' + convert(
char(1), @Shiftd)
END
ELSE
PRNT 'No records found for the
given employee'
END

You have to create an update trigger, trgMagic, on the EmployeeDepartmentHistory table. You
want that whenever any update statement is fired on the EmployeeDepartmentHistory table, the
trgMagic trigger is executed and displays the previous value in the table as well as the updated
value. Which of the following statements would you use to perform the required task?
1, CREATE TRGGER
[HumanResources].[trgMagic]
ON
[HumanResources].[Employe
eDepartmentHistory]
OF UPDATE AS
BEGN
SELECT * FROM Deleted
SELECT * FROM nserted
END;
2, CREATE TRGGER
[HumanResources].[trgMagic]
ON
[HumanResources].[Employee
DepartmentHistory]
FOR UPDATE AS
BEGN
SELECT * FROM Deleted
SELECT * FROM nserted
END;
3, CREATE TRGGER
[HumanResources].[trgMagic]
ON
[HumanResources].[Employee
DepartmentHistory]
AFTER UPDATE AS
BEGN
SELECT * FROM Deleted
SELECT * FROM nserted
END;
4, CREATE TRGGER
[HumanResources].[trgMagic]
ON
[HumanResources].[EmployeeD
epartmentHistory]
NSTEAD OF UPDATE AS
BEGN
SELECT * FROM Deleted
SELECT * FROM nserted
END;

___________ is a set of functions that provide programmable logic used by client applications
over the nternet.
1, Web service 2, Service-Oriented
Architecture
3, HTTP 4, Personal Desktop Assistant
___________ is an extension of distributed computing based on the request/reply design pattern. 1, Web service 2, Service-Oriented
Architecture
3, HTTP 4, SOAP
To use the native XML Web services of the SQL Server, you need to establish an ______ endpoint
at the server.
1, SOAP 2, WSDL 3, UDD 4, HTTP
Which of the following database objects in the Service Broker architecture is an addressable
endpoint for the conversations?
1, Message 2, Service 3, Contract 4, Queue
The Customer table in the database contains the information about the credit cards of the
customers. You need to check whether the credit card number provided by the customer is valid.
For this, you want to call a Web service. Which of the following options would you use to perform
this task?
1, Managed database objects 2, Transaction 3, Stored procedure 4, Trigger
You have to create Service Broker objects in the AdventureWorks database. For this, you first
need to enable Service Broker in the database. Which of the following statements can be used to
enable Service Broker?
1, ALTER DATABASE
AdventureWorks
ENABLE_BROKER
2, ALTER AdventureWorks
ENABLE_BROKER
3, ALTER DATABASE
AdventureWorks
ENABLE_SERVCE_BROKE
R
4, ALTER DATABASE
AdventureWorks
ENABLE_SERVCEBROKER

You have to create a message named myMessage that will be exchanged between the Service
Broker services. The message will not be validated before sending. Which of the following
statements can be used to create the message?
1,CREATE MESSAGE TYPE
myMessage
VALDATON =
WELL_FORMED_XML
2, CREATE MESSAGE TYPE
myMessage
3, CREATE MESSAGE TYPE
myMessage
VALDATON = VALD_XML
WTH SCHEMA
COLLECTON
4, CREATE MESSAGE TYPE
myMessage
VALDATON = EMPTY

You have to implement Service Broker architecture between two services. For this, you have to
create an agreement to define the messages that will be exchanged between the two services.
Which of the following objects needs to be created to accomplish this?
1, MessageType 2, Contract 3, Service 4, Queue
Which of the following statements will you use to enable the CLR integration feature in the
database?
1, sp_configure
CLR_ENABLED, 1;
GO
RECONFGURE;
GO
2, sp_configure CLR
ENABLED, 1;
GO
RECONFGURE;
GO
3, sp_configure
CLR_ENABLE, 1;
GO
RECONFGURE;
GO
4, sp_configure ENABLE_CLR,
1;
GO
RECONFGURE;
GO

You have created a .NET assembly named CLRntegration.dll. You need to import this assembly
in SQL Server database engine such that the .NET code is able to access any resource within or
outside SQL Server. For this, you created the assembly object by using the following code:

CREATE ASSEMBLY CLRntegration FROM


'C:\CLRntegration.dll' WTH PERMSSON_SET = SAFE

However, the preceding code does not allow the .NET code to access any external resource.
Analyze the preceding code and provide the correct solution.
1, CREATE ASSEMBLY
CLRntegration FROM
'C:\CLRntegration.dll' WTH
PERMSSON_SET = ANY
2, CREATE ASSEMBLY
CLRntegration FROM
'C:\CLRntegration.dll' WTH
PERMSSON_SET =
EXTERNAL_ACCESS
3, CREATE ASSEMBLY
CLRntegration FROM
'C:\CLRntegration.dll' WTH
PERMSSON_SET =
UNSAFE
4, CREATE ASSEMBLY
CLRntegration FROM
'C:\CLRntegration.dll' WTH
PERMSSON_SET =
EXTERNAL

You have to create a contract to define an agreement between two services in SQL Server. The
message type defined by this contract can be sent only by the endpoint that started the
conversation. For this, you have used the following code:

CREATE CONTRACT sendContract


(
sendMessage SENT BY TARGET
);

However, the preceding code allows the message to be sent by the endpoint that is the target of
the conversation. Analyze the problem and provide the correct solution.
1, CREATE CONTRACT
sendContract
(
sendMessage BY
NTATOR
);
2, CREATE CONTRACT
sendContract
(
sendMessage SENT BY
NTATOR ONLY
);
3, CREATE CONTRACT
sendContract
(
sendMessage SENT BY
ANY
);
4, CREATE CONTRACT
sendContract
(
sendMessage SENT BY
NTATOR
);

___________ allows the database developers to create objects in any of the .NET-supported
languages and embeds the objects in the database.
1, T-SQL 2, XML file 3, CLR integration 4, Functions
You have created a procedure, getSalesDetails that returns a result set. You need to create an
HTTP endpoint named sqlEndpoint to provide the getSalesDetails procedure as a Web method.
For this, you used the following statement in SQL Server:

CREATE ENDPONT sqlEndpoint


STATE = STARTED AS HTTP(
PATH = '/sql',
AUTHENTCATON = (NTEGRATED ),
PORTS = ( CLEAR ), STE = 'SERVER' )
FOR SOAP (
WEBMETHOD 'getSqlnfo' (name='master.dbo.xp_msver', SCHEMA=STANDARD
),
WEBMETHOD 'getSalesDetails' (name='master.sys.fn_MSdayasnumber'),
WSDL = DEFAULT, SCHEMA = STANDARD, DATABASE = 'master', NAMESPACE =
'http://tempUri.org/' );

However, when the preceding statement is executed, the following error is displayed:

Msg 7890, Level 16, State 1, Line 1

dentify the reason for this error and provide the correct solution.
1, This error occurs when the
port 8080 is being used by
some other service and is not
free to host any other
service. To resolve the error,
you need to use the following
statement:
PORTS = ( CLEAR ),
Clear_Port = 8080, STE =
'localhost' )
2, This error occurs when the
authentication type used is
NTEGRATED. To resolve the
error, you need to use the
following statement:
AUTHENTCATON = (BASC)
3, This error occurs when an
inline XSD schema will be
returned for the current Web
method in the SOAP
responses. To resolve the
error, you need to use the
following statement:
SCHEMA= NONE
4, This error occurs when the
WSDL document generation is
not supported for this endpoint.
To resolve the error, you need
to use the following statement:
WSDL = NONE

You have to create a service to be used by Service Broker to deliver messages to the correct
queue within a database. The service will store all the messages in the queue named sendQueue.
The contract for this service will be sendContract. To create the service, you used the following
statement:

CREATE SERVCE sendService


ON QUEUE
(sendContract) [dbo].[sendQueue]

However, the preceding statement displays a syntactical error. Analyze the statement and provide
the correct solution.
1, CREATE SERVCE
sendService
ON QUEUE
[dbo].[sendQueue]
(sendContract)
2, CREATE SERVCE
sendService
ON QUEUE
[dbo].[sendQueue]
CONTRACT (sendContract)
3, CREATE SERVCE
sendService
ON QUEUE
[dbo].[sendQueue]
4, CREATE SERVCE
sendService
ON CONTRACT
(sendContract)
[dbo].[sendQueue]

You have to create a managed stored procedure to store the employee details in an XML file. For
this, you have created the ConvertXML.dll assembly and registered it in SQL Server with the name
ConvertXMLAssembly. The code for ConvertXML.dll assembly is:

namespace CLRStoredProcedure
{
public class XMLProc
{
public static void convXml()
{
.
}
}
}

Now, you have to create a stored procedure and associate it with the convXML() method contained
in the ConvertXML.dll assembly. For this, you have used the following statement:

CREATE PROCEDURE clrproc AS EXTERNAL NAME


ConvertXML.[CLRStoredProcedure.XMLProc].convXml

Analyze the scenario and identify whether the preceding statement will create the required
managed stored procedure. f not, provide the correct solution.
1, There is no error in the
code and managed stored
procedure will be created
successfully.
2, No, the correct statement to
create the managed stored
procedure is:

CREATE PROCEDURE
clrproc AS EXTERNAL
NAME
CLRStoredProcedure.XMLProc
.convXml
3, No, the correct statement to
create the managed stored
procedure is:

CREATE PROCEDURE
clrproc AS EXTERNAL
NAME
ConvertXML.XMLProc.convX
ml
4, No, the correct statement to
create the managed stored
procedure is:

CREATE PROCEDURE clrproc


AS EXTERNAL NAME
ConvertXMLAssembly.[CLRStor
edProcedure.XMLProc].convXm
l

Consider the following code for the CalcSal.dll assembly:

namespace EmployeePay
{
public class Pay
{
public static SqlString calcSalary(SqlString emp)
{
.
}
}
}

You have imported the preceding assembly in SQL Server database engine by the name
CalcSalAssembly. Now, you have to create a managed function named SalaryCalculation that will
refer to the calcSalary() method of the preceding assembly. Which of the following statements
would you use to create the managed function?
1, CREATE FUNCTON
SalaryCalculation(@EmpD
as nVarchar(3))
AS EXTERNAL NAME
CalcSalAssembly.[Employee
Pay.Pay].calcSalary
2, CREATE FUNCTON
SalaryCalculation
RETURNS nVarchar
AS EXTERNAL NAME
CalcSalAssembly.[EmployeeP
ay.Pay].calcSalary
3, CREATE FUNCTON
SalaryCalculation(@EmpD as
nVarchar(3))
RETURNS nVarchar(10)
AS EXTERNAL NAME
CalcSal.[EmployeePay.Pay].c
alcSalary
4, CREATE FUNCTON
SalaryCalculation(@EmpD as
nVarchar(3))
RETURNS nVarchar(10)
AS EXTERNAL NAME
CalcSalAssembly.[EmployeePa
y.Pay].calcSalary

The UserNameAudit table in the database stores various details of the users including the E-mail
address. While inserting the users details, you need to validate the E-mail address to ensure that it
is a valid E-mail address. You have created the ValidateMail.dll assembly to implement the logic
of validating the E-mail address. The code of ValidateMail.dll assembly is:

public class trgMail


{
public static void MailValid()
{
// Write the logic of validating the e-mail address
}
}

You have imported the preceding assembly in SQL Server database engine by the name
ValidateEmailAssembly. Now, you have to create a trigger that will refer to the MailValid() method
of the preceding assembly. Which of the following statements would you use to create the
managed trigger?
1, CREATE TRGGER
EmailValidation
OF NSERT ON
UserNameAudit
AS EXTERNAL NAME
ValidateEmailAssembly.trgM
ail.MailValid
2, CREATE TRGGER
EmailValidation
ON UserNameAudit FOR
NSERT
AS EXTERNAL NAME
ValidateEmailAssembly.trgMail
.MailValid
3, CREATE TRGGER
EmailValidation
FOR NSERT ON
UserNameAudit
AS EXTERNAL NAME
ValidateEmailAssembly.trgMai
l.MailValid
4, CREATE TRGGER
EmailValidation
ON UserNameAudit FOR
NSERT
AS EXTERNAL NAME
ValidateEmailAssembly.trgMail

You have to implement Service Broker architecture in the database engine to create services that
converse with each other by sending and receiving messages. For this, you have created the
message type. Now, you need to create a queue object that is available to receive messages.
Which of the following statements would you use to accomplish this task?
1, CREATE QUEUE
sendQueue WTH STATUS =
ON
2, CREATE QUEUE
sendQueue WTH STATUS =
OFF RETENTON = ON
3, CREATE QUEUE
sendQueue WTH
ACTVATON = ON
4, CREATE QUEUE
sendQueue WTH ACTVATON
= ON RETENTON = ON

You have to implement Service Broker architecture in the database engine to create services that
converse with each other by sending and receiving messages. For this, you have created two
services, sendMessage and receiveMessage services. Now, you need to begin a conversation
between the sendMessage and receiveMessage services by using the sendContract contract.
Which of the following statements would you use to accomplish this task?
1, DECLARE
@dialog_handle
UNQUEDENTFER;
BEGN DALOG
CONVERSATON
@dialog_handle FROM
SERVCE [sendMessage] TO
SERVCE 'receiveMessage'
ON CONTRACT
[sendContract];
2, DECLARE
@dialog_handle;
BEGN DALOG
CONVERSATON
@dialog_handle FROM
SERVCE [sendMessage] TO
SERVCE 'receiveMessage'
ON CONTRACT
[sendContract];
3, DECLARE @dialog_handle
UNQUEDENTFER;
BEGN DALOG
CONVERSATON
@dialog_handle FROM
SERVCE [sendMessage] TO
SERVCE 'receiveMessage'
ON [sendContract]
CONTRACT;
4, DECLARE @dialog_handle
UNQUEDENTFER;
BEGN CONVERSATON
@dialog_handle FROM
SERVCE [sendMessage] TO
SERVCE 'receiveMessage' ON
CONTRACT [sendContract];

You have to implement Service Broker architecture in the database engine to create services that
converse with each other by sending and receiving messages. For this, you have created all the
required broker objects and started the conversation. Now, you need to send and receive
messages. Which of the following statements would you use to send a message named
sendMessage?
1, SEND ON
CONVERSATON
@dialog_handle FOR
MESSAGE TYPE
[sendMessage]
('<name>John</name>')
2, SEND ON
CONVERSATON
@dialog_handle MESSAGE
TYPE [sendMessage]
('<name>John</name>')
3, SEND ON
CONVERSATON
@dialog_handle MESSAGE
[sendMessage]
('<name>John</name>')
4, SEND ON
CONVERSATON
@dialog_handle FOR
MESSAGE [sendMessage]
('<name>John</name>')

122 Which of the following components of the .NET Framework provides the various services, such as
code compilation, memory allocation, and garbage collection?
1, Common Language
Runtime
2, Windows Forms 3, .NET framework base
classes
4, ASP.NET 1
123 Which of the following properties of a form is used to specify whether a form will be displayed as a
normal, maximized, or minimized window on startup?
1, Size 2, StartPosition 3, WindowState 4, Text 3
124 Which of the following events of a Windows form occurs when the form loses focus and is no
longer active?
1, Deactivate 2, FormClosed 3, Click 4, Load 1
125 Which of the following properties of the ListBox control can be set at design time as well as at run
time?
1, Sorted 2, SelectionMode 3, Selectedndex 4, Selectedtem 2
126 Which of the following controls allows the user to select an option from the given list and also
allows him to type new text in it?
1, LinkLabel Control 2, TextBox Control 3, ComboBox Control 4, ListBox Control 3
127 Which of the following properties of the GroupBox control is used to specify the caption to be
displayed for the control?
1, DocumentTitle 2, Value 3, Text 4, Font 3
128 _____________ function is used to convert char to int data type. 1, Parse.Tont32 2, DateTime.Parse 3, Convert.Tont32 4, Convert.ToDateTime 3
129 You cannot create an instance of the __________ by using the new keyword. 1, ErrorProvider Class 2, MessageBox Class 3, ToolStrip Class 4, StatusStrip Class 2
130 You are working as an application developer in CompSol nc. You are asked to create a Windows-
based application that should have a single Form. The Form should contain multiple controls to
take input from user. After creating the application, you compiled it. During compilation, you
encountered few errors in your code. Which of the following steps you need to perform to view
error details?
1, Select Debug-->Windows--
>Breakpoints from the Menu
bar.
2, Select Window-->Error List
from the Menu bar.
3, Select Debug-->Exceptions
from the Menu bar.
4, Select View-->Error List from
the Menu bar.
4
131 You are working as an application developer in CompSol nc. You are asked to develop a
Windows-based application for a grocery shop. The application should allow the user to select a
grocery item from the list of items. Which of the following code snippets, you need to write in your
application to create the list of grocery items?
1, ....................
......................
listBox1.tems.Add("Rice");
listBox1.tems.Add("Flour");
......................................
..................................
2, ....................
......................
listBox1.Add("Rice");
listBox1.Add("Flour");
......................................
..................................
3, ....................
......................
comboBox1.tems.Add("Rice")
;
comboBox1.tems.Add("Flour"
);
......................................
..................................
4, ....................
......................
comboBox1.Add("Rice");
comboBox1.Add("Flour");
......................................
..................................
1
132 You are working as an application developer in ABC Corp. You are asked to create a Windows-
based application for a school to gather the information about the students taking admission in the
school. The application should have a Form to enter the information about the students. The Form
should have a button control that should allow the user to submit the information. You need to
provide an appropriate caption to the button control. dentify the code snippet that should be used
in your application to accomplish the desired task.
1, button1.Text = "Submit
Details";
2, button1.Name = "Submit
Details";
3, button1.Tag = "Submit
Details";
4, button1.TextAlign = "Submit
Details";
1
You are working as an application developer in nfoSol nc. You are asked to develop a Windows-
based application for a grocery store. The application should have an interface that should take the
bill amount of the customers as input. f the bill amount is greater than 500 dollars, a button control
must be added to the nterface. The click event of the button control should use Next() method of
System.Random class to generate the discount amount between 5% and 35% for the customers
who have made purchases more than 500 dollars. The customers must be greeted with an
appropriate message.
dentify the correct code to accomplish the desired task.
1, public partial class Form1 :
Form
{
int BillAmount;
Button btn = new
Button();
public Form1()
{

nitializeComponent();
btn.Click += new
EventHandler(btn_Click);
}
private void
btn_Click(object sender,
EventArgs e)
{
Random rnd = new
Random();
int x =
rnd.Next(5,35);

MessageBox.Show("Congrat
ulations!!!!! You get "+x+"%
discount");
}
private void
button1_Click(object sender,
EventArgs e)
{
BillAmount =
Convert.Tont32(textBox1.Te
2, public partial class Form1 :
Form
{
int BillAmount;
Button btn = new
Button();
public Form1()
{

nitializeComponent();

}
private void
btn_Click(object sender,
EventArgs e)
{
Random rnd = new
Random();
int x =
rnd.Next(5,35);

MessageBox.Show("Congratul
ations!!!!! You get "+x+"%
discount");
}
private void
button1_Click(object sender,
EventArgs e)
{
BillAmount =
Convert.Tont32(textBox1.Text
);
3, public partial class Form1 :
Form
{
int BillAmount;

public Form1()
{

nitializeComponent();
btn.Click += new
EventHandler(btn_Click);
}
private void
btn_Click(object sender,
EventArgs e)
{
Random rnd = new
Random();
int x =
rnd.Next(5,35);

MessageBox.Show("Congratul
ations!!!!! You get "+x+"%
discount");
}
private void
button1_Click(object sender,
EventArgs e)
{
BillAmount =
Convert.Tont32(textBox1.Tex
t);
4, public partial class Form1 :
Form
{
int BillAmount;
Button btn = new
Button();
public Form1()
{
nitializeComponent();
btn.Click += new
EventHandler(btn_Click);
}
private void
btn_Click(object sender,
EventArgs e)
{
Random rnd = new
Random();
int x = rnd.Next(5,35);

MessageBox.Show("Congratulat
ions!!!!! You get "+x+"%
discount");
}
private void
button1_Click(object sender,
EventArgs e)
{
BillAmount =
Convert.Tont32(textBox1.Text);

if (BillAmount > 500)

You are working as an application developer in CompSol nc. You are asked to create a Windows
based application that should have the login form. The application should allow the user to create
their login D. You need to add a validation check on the TextBox control that takes the password
from the user. An appropriate message should be shown to the user if the length of the password is
less than 6 characters. Which of the following code snippet you need to add to your application
code to accomplish the task.
1, private void
textBox1_Validating(object
sender, CancelEventArgs
e)
{

if(textBox1.Text.Length<=6)

{

MessageBox.Show("Length
of the Password is not
valid");
}
2, private void
textBox1_Validating(object
sender, CancelEventArgs e)
{

if(Convert.Tont32(textBox1.Te
xt)<6)
{

MessageBox.Show("Length of
the Password is not valid");
}
3, private void
textBox1_Validating(object
sender, CancelEventArgs e)
{

if(Convert.ToDateTime(textBo
x1.Text.Length)<6)
{

MessageBox.Show("Length of
the Password is not valid");
}
4, private void
textBox1_Validating(object
sender, CancelEventArgs e)
{

if(textBox1.Text.Length<6)
{

MessageBox.Show("Length of
the Password is not valid");
}

You are developing a Windows-based application that creates the multiple objects of the Button
class at run time. Which of the following components of the .NET Framework allocate memory to
these objects?
1, ASP.NET 2, .NET Framework base
classes
3, JT Compiler 4, Common Language Runtime
You are creating a Windows-based application. You need to drag multiple controls from the
Toolbox window to the Form control. For your convenience, you want the Toolbox window to be
opened permanently. Which of the following features of Visual Studio .NET DE you need to
modify?
1, Floating 2, Auto hide 3, Tabbed navigation 4, Docking
137 You are asked to create a Windows-based application. The form of the application must appear at
the centre of the screen when application is executed. Which of the following properties you need
to set to accomplish the desired task?
1, Size 2, StartPosition 3, WindowState 4, Backgroundmage 2
138 You are asked to create a Windows-based application. The form present in the application when
gets the focus at run time should come to the front of other applications or its caption should flash
on the task bar. Which of the following methods you need to use to accomplish the desired task?
1, Activate() 2, SetDesktopLocation() 3, Show() 4, Close() 1
139 Which of the following controls is a container control? 1, Dialog Box Control 2, Label Control 3, Button Control 4, Textbox Control 1
140 __________ is a process by which an application in the Windows environment is able to link to
library functions at run time.
1, Static linking 2, Dynamic linking 3, Execution 4, Compilation 2
141 Which of the foIIowing types of CommonDiaIog cIasses can be used to change the size of
the text in the Windows-based appIication?
1, CoIorDiaIog CIass 2, FontDiaIog CIass 3, FiIeDiaIog CIass 4, PrintDiaIog CIass 2
142 Which of the following properties is used to create an MD parent form? 1, Mergendex 2, MergeAction 3, ActiveMdiChild 4, sMdiContainer 4
143 Which of the following classes is used for printing the text as well as graphics? 1, PrintPageEventArgs Class 2, PrintDialog Class 3, Graphics Class 4, PrintDocument Class 4
144 The ______________ is used to display the Print Setup page on the screen by using the
ShowDialog() method.
1, PageSetupDialog class 2, PageSettings class 3, PrintDialog class 4, PrintDocument class 1
145 Which of the following control properties specifies the use of an element in the user interface and
reports it to accessibility aids?
1, AccessibleName 2, AccessibleDescription 3, AccessibleRole 4, Tabndex 3
146 You are working as an application developer in CompSol nc. You are asked to create a Windows
based application for children. Through the application, children will be able to learn about the
color combinations. Your interface should have one TextBox control and two Button controls
required to set the background and foreground color of the text written in the TextBox control. Your
application should use the ColorDialog control to invoke the default Color dialog box. dentify the
correct code snippet that you need to add to your application.
1, private void
Background_Click(object
sender, EventArgs e)
{
ColorDialog
colorDialog1 = new
ColorDialog();

colorDialog1.ShowDialog();
textBox1.BackColor =
colorDialog1.Color;
}

private void
Foreground_Click(object
sender, EventArgs e)
{
ColorDialog
colorDialog2 = new
ColorDialog();

colorDialog2.ShowDialog();
textBox1.ForeColor =
colorDialog1.Color;
}
2, ColorDialog CDialog;
private void
Background_Click(object
sender, EventArgs e)
{

CDialog.ShowDialog();
textBox1.BackColor =
CDialog.Color;
}
private void
Foreground_Click(object
sender, EventArgs e)
{

CDialog.ShowDialog();
textBox1.ForeColor =
CDialog.Color;
}
3, private void
Background_Click(object
sender, EventArgs e)
{

colorDialog1.ShowDialog();
textBox1.BackColor =
colorDialog1.Color;
}

private void
Foreground_Click(object
sender, EventArgs e)
{

colorDialog1.ShowDialog();
textBox1.ForeColor =
colorDialog1.Color;
}
4, ColorDialog CDialog = new
ColorDialog();
private void
Background_Click(object
sender, EventArgs e)
{
CDialog.ShowDialog();
textBox1.BackColor =
CDialog.Color;
}
private void
Foreground_Click(object
sender, EventArgs e)
{
CDialog.ShowDialog();
textBox1.ForeColor =
CDialog.Color;
}
3
You are working as an application developer in nfoSol nc. You are asked to create a Windows-
based application for a school. The application should enable the user to enter the data in the
Student Details forms. The Student Details form should have a menu item named Print, which
should get merged with the main MD parent form menu. When the user clicks the Student Details
form, the Student Details form should be displayed. The user should be able to close the
application by clicking the Exit menu item. dentify the correct sequence of tasks that you need to
perform to create the application.
1, 1. Create a new VC#
application.
2. Design the menu on the
MD parent form.
3. Convert the form to the
MD parent form.
4. Design the Student Details
entry form.
5. Create the Print menu on
the Student Details entry
form.
6. Add code to MD parent
form and Student Details
entry form.
7. Execute the application
and verify the output.
2, 1. Create a new VC#
application.
2. Convert the form to the MD
parent form.
3. Design the menu on the MD
parent form.
4. Add code to MD parent
form and Student Details entry
form.
5. Design the Student Details
entry form.
6. Create the Print menu on
the Student Details entry
form.
7. Execute the application and
verify the output.
3, 1. Create a new VC#
application.
2. Convert the form to the MD
parent form.
3. Design the menu on the
MD parent form.
4. Design the Student Details
entry form.
5. Create the Print menu on
the Student Details entry
form.
6. Add code to MD parent
form and Student Details entry
form.
7. Execute the application and
verify the output.
4, 1. Create a new VC#
application.
2. Convert the form to the MD
parent form.
3. Add code to MD parent form
and Student Details entry
form.
4. Design the menu on the MD
parent form.
5. Design the Student Details
entry form.
6. Create the Print menu on the
Student Details entry form.
7. Execute the application and
verify the output.

You are working as an application developer in nfoSol nc. You are asked to create a Window-
based application that should allow the user to type in the content and then print it. Your
application should use the PrintDialog and PrintDocument controls to invoke the default Print
dialog box. dentify the correct code that you need to add to your application.
1, private void
Print_Click(object sender,
EventArgs e)
{

printDialog1.Document =
printDocument1;
DialogResult result =
printDialog1.ShowDialog();
if (result ==
DialogResult.OK)

printDocument1.Print();
}
private void
printDocument1_PrintPage(o
bject sender,
System.Drawing.Printing.Prin
tPageEventArgs e)
{

e.Graphics.DrawString(textB
ox1.Text, new
Font("Arial",40,
FontStyle.Bold),
Brushes.Black, 150, 125);
}
2, private void
Print_Click(object sender,
EventArgs e)
{
printDialog1.Document
= printDocument1;
if (result ==
DialogResult.OK)

printDocument1.Print();
}
private void
printDocument1_PrintPage(obj
ect sender,
System.Drawing.Printing.Print
PageEventArgs e)
{

e.Graphics.DrawString(textBox
1.Text, new Font("Arial",40,
FontStyle.Bold),
Brushes.Black, 150, 125);
}
3, public partial class Form1 :
Form
{
PrintDialog pdlg = new
PrintDialog();
internal PrintDocument
PDocument = new
PrintDocument();
public Form1()
{

nitializeComponent();
}
private void
Print_Click(object sender,
EventArgs e)
{
pdlg.Document =
PDocument;
DialogResult result =
pdlg.ShowDialog();
if (result ==
DialogResult.OK)

PDocument.Print();
}
private void
PDocument_PrintPage(object
sender,System.Drawing.Printi
ng.PrintPageEventArgs e)
{

4, public partial class Form1 :
Form
{
PrintDialog pdlg = new
PrintDialog();
internal PrintDocument
PDocument = new
PrintDocument();
public Form1()
{
nitializeComponent();
}
private void
Print_Click(object sender,
EventArgs e)
{
pdlg.Document =
PDocument;
if (result ==
DialogResult.OK)
PDocument.Print();
}
private void
PDocument_PrintPage(object
sender,System.Drawing.Printing
.PrintPageEventArgs e)
{

e.Graphics.DrawString(textBox1
.Text, new Font("Arial", 40,
FontStyle.Bold),
Brushes.Black, 150, 125);

You are working as an application developer in nfoSol Corp. You are asked to create a Window-
based application that should implement the concept of globalization. The application should have
an interface to provide the information about culture settings of the system on which the
application is running. The information should be available on the message box when the user
clicks the button. dentify the code that you need to add to the click event of the button control.
1, private void
button1_Click(object sender,
EventArgs e)
{
Culturenfo
myCulture;
myCulture =
CurrentCulture;

MessageBox.Show("Your
Culture nfo is:"+"
"+myCulture.ToString());
}
2, private void
button1_Click(object sender,
EventArgs e)
{
Culturenfo
myCulture;
myCulture =
Culturenfo.CurrentCulture();

MessageBox.Show("Your
Culture nfo is:"+"
"+myCulture.ToString());
}
3, private void
button1_Click(object sender,
EventArgs e)
{
Culturenfo myCulture
= new Culturenfo();
myCulture =
Culturenfo.CurrentCulture;

MessageBox.Show("Your
Culture nfo is:"+"
"+myCulture.ToString());
}
4, private void
button1_Click(object sender,
EventArgs e)
{
Culturenfo myCulture;
myCulture =
Culturenfo.CurrentCulture;

MessageBox.Show("Your
Culture nfo is:"+"
"+myCulture.ToString());
}

You are working as an application developer in nfosol Corp. You are asked to create a Windows-
based application that should have Pop-up help for displaying tips for the controls present in the
application. dentify the correct steps that you need to perform for enabling the Pop-up help in a
form present in the application.
1, 1. Set the MinimizeBox
property of the form to
True.
2. Set the MaximizeBox
property of the form to
False.
3. Set the HelpButton
property of the form to
True.
4. Add a HelpProvider control
to the form.
2, 1. Set the MinimizeBox
property of the form to False.
2. Set the MaximizeBox
property of the form to True.
3. Set the HelpButton property
of the form to True.
4. Add a HelpProvider control
to the form.
3, 1. Set the MinimizeBox
property of the form to True.
2. Set the MaximizeBox
property of the form to True.
3. Set the HelpButton property
of the form to False.
4. Add a HelpProvider control
to the form.
4, 1. Set the MinimizeBox
property of the form to False
2. Set the MaximizeBox
property of the form to False.
3. Set the HelpButton property
of the form to True.
4. Add a HelpProvider control to
the form.

Anthony is working as an application developer in nfosol corp. He is asked to create a Windows-


based application that should allow the users to print the content they have typed in the textbox.
The application should invoke the default Print dialog box by instantiating the PrintDialog class. He
writes the following code to accomplish the task.
...........
............
using System.Drawing.Printing;
namespace Print
{
public partial class Form1 : Form
{
PrintDialog pdlg = new PrintDialog();
internal PrintDocument PDocument = new PrintDocument();
public Form1()
{
nitializeComponent();
}
private void Print_Click(object sender, EventArgs e)
{
pdlg.Document = PDocument;
DialogResult result = pdlg.ShowDialog();
if (result == DialogResult.OK)
PDocument.Print();
}
private void PDocument_PrintPage(object
sender,System.Drawing.Printing.PrintPageEventArgs e)
{
Graphics.DrawString(textBox1.Text, new Font("Arial", 40, FontStyle.Bold), Brushes.Black,
150, 125);
} }}

1,
Graphics.DrawString(textBox
1.Text, new Font("Arial", 40,
FontStyle.Bold),
Brushes.Black, 150, 125);
2, pdlg.Document =
PDocument;
3, internal PrintDocument
PDocument = new
PrintDocument();
4, PrintDialog pdlg = new
PrintDialog();

John is working as an application developer in BestRetails Corp. He was asked to create an


application that should provide a detailed report of the sales made over a period of time. He
created the application using crystal reports to generate the required report. To generate a report
the
application should connect to a database that is shared by other applications running in the
organization. When the application was executed to generate the report, the records were not
displayed in the tables present in the report. dentify the possible error that John could have made.
1, He used the Pull Model
method for generating
reports.
2, There is an error in the code
he wrote for the Pull Model
method.
3, There is an error in the
code written for populating
datasets in the Push Model
method.
4, He used the Push Model
method for generating reports.

John is working as an application developer in nfoSol nc. He is asked to develop a Windows-


based application that should show the date in different formats according to the settings available
on the systems in different countries. He writes the following code in his application:
.....
........
DateTime MyDateTime = DateTime.Parse(System.DateTime.Now);
DateLabel.Text = (MyDateTime.ToString("d"));

However, the preceding code gives the compile time error. dentify the correct reason for error.
1, The MyDateTime object is
not declared correctly. t
should be declared as:
DateTime MyDateTime =
new DateTime();
2, Error in the parameter
passed to the ToString()
method. t should not have any
parameter passed to it.
3, Error in the parameter
passed to the Parse() method.
The parameter should have
used ToString() method to
convert the date into string.
4, Wrong method called by the
DateTime class. The ToString()
method should have been used.

154 Anthony is an application developer in nfoNet nc. He is asked to create a Windows-based


application for BestRetails nc. BestRetails nc., is a leading retail organization that has its
business spread in four countries, France, Japan, Spain, and US. He needs to create the common
application that should automatically load the appropriate version of the interface according to the
existing culture settings on different systems in different countries. He creates the application that
runs perfectly. However, in Japan the application displays the default interface of US. dentify the
reason for this anomaly.
1, The Language property of
the Form is set to French.
2, The Language property of
the Form is set to Spanish.
3, The Language property of
the Form is set to English
(United States).
4, The resource file for Japan
culture is not created.
4
155 Anthony is an application developer in nfoGain nc. He is asked update an existing Windows-
based application without recompiling it. To update the application, he needs to create a resource-
only assembly. He performs the following steps to create the resource-only assembly:
1. Create a new VC# project with the Empty Project template.
2. n Solution Explorer, right-click the project and choose Properties. The Property pages open.
3. n the Output Type drop-down menu, change the output type of the project to Class Library. This
will cause the assembly to be compiled as a .dll
file.
4. From the Build menu, choose Build <project> where <project> is the name of the project. The
resources you added to the project, are compiled into the assembly.
However, he is not able to accomplish the desired task. dentify the mistake he has made.
1, He should have made the
resource assembly as an
.exe file.
2, He has not added the
resource files to the existing
VC# application that needs to
be updated
3, He has not selected the
Windows Forms Application
template.
4, He has not added the
resource files to the new VC#
project by choosing Add
Existing tem from the Project
menu.
4
156 You are creating an MD application that supports more than one instances of a child form. You
need to write a code snippet to get an instance of the child form that has the focus or that is most
recently active. dentify the correct code snippet that you need to write in your application code.
1, Form activeChildForm =
this.ActiveMdiChild();
2, Form activeChildForm =
new Form();
this.ActiveMdiChild;
3, Form activeChildForm =
ActiveMdiChild;
4, Form activeChildForm =
this.ActiveMdiChild;
4
157 You are creating a Windows-based application that accesses the printer. Your application should
have restricted access to the printer. Which of the following printing permission levels allows
printing only from a more-restricted dialog box?
1, SafePrinting 2, NoPrinting 3, DefaultPrinting 4, AllPrinting 1
158 You are creating a Windows-based application that is using the CrystalReportViewer control to
display the groups into which the Crystal Reports is divided. Which of the following components of
the CrystalReportViewer control you will use to accomplish the desired task?
1, Main Report Window 2, Export Report 3, Toggle Group Tree 4, Group Tree 4
159 You are asked to create a Windows-based application that should be able to retrieve the image
resources from an assembly at run time by using the ResourceManager class. Which of the
following methods of the ResourceManager class you need to use to retrieve images from the
assembly?
1, Load() 2, GetType() 3, GetObject() 4, GetString() 3
160 You are asked to create a help system by using the HTML Help Workshop (hhw.exe) tool, which is
a help-authoring tool. n which of the following files you will put the text that will appear on each
page in the help system?
1, HTML Files 2, Graphics and Multimedia
Files
3, Help Project Files 4, Contents Files 1
You are working as a developer in nfoSol nc. You are asked to create an application that allow
the user to load the picture available on the machine on which the application is running. The
application should allow the user to enter the path, where the picture is located, in the textbox. You
need to use the asynchronous method to create your application. dentify the correct code that you
need to add to your application.
1, private void
pictureBox1_LoadCompleted
(object sender,
AsyncCompletedEventArgs
e)
{
if (e.Error != null)
{

MessageBox.Show(e.Error.M
essage);
}
else if (e.Cancelled)
{

MessageBox.Show("Load
cancelled");
}
else
{

MessageBox.Show("Load
completed");
}
}

private void
btnLoadPicture_Click(object
sender, EventArgs e)
{

pictureBox1.Load(textBox1.T
2, private void
pictureBox1_LoadCompleted(o
bject sender,
AsyncCompletedEventArgs
e)
{
if (e.Error != null)
{

MessageBox.Show(e.Error.Me
ssage);
}
else if (e.Cancelled)
{

MessageBox.Show("Load
cancelled");
}
else
{

MessageBox.Show("Load
completed");
}
}

private void
btnLoadPicture_Click(object
sender, EventArgs e)
{

pictureBox1.AddAsync(textBox
3, private void
pictureBox1_LoadCompleted(
object sender,
AsyncCompletedEventArgs
e)
{
if (e.Error != null)
{

MessageBox.Show(e.Error.Me
ssage);
}
else if (e.Cancelled)
{

MessageBox.Show("Load
cancelled");
}
else
{

MessageBox.Show("Load
completed");
}
}

private void
btnLoadPicture_Click(object
sender, EventArgs e)
{

pictureBox1.LoadAsync();
4, private void
pictureBox1_LoadCompleted(ob
ject sender,
AsyncCompletedEventArgs e)
{
if (e.Error != null)
{

MessageBox.Show(e.Error.Mes
sage);
}
else if (e.Cancelled)
{

MessageBox.Show("Load
cancelled");
}
else
{

MessageBox.Show("Load
completed");
}
}

private void
btnLoadPicture_Click(object
sender, EventArgs e)
{

pictureBox1.LoadAsync(textBox
1.Text.ToString());

You are working as a developer in nfoSol nc. You are asked to create a Windows-based
application that should implement the concept of asynchronous programming. For such
application, the Event Handlers must be assigned to the DoWork and the RunWorkerCompleted
events. To do so, you need to identify the correct code snippet to be added to the constructor of
the class in the application.
1,
backgroundWorker1.DoWork
+= new
DoWorkEventHandler(backgr
oundWorker1_DoWork);
this.backgroundWorker1.Run
WorkerCompleted += new
RunWorkerCompletedEvent
Handler();
2,
backgroundWorker1.DoWork
+= new
DoWorkEventHandler();
this.backgroundWorker1.Run
WorkerCompleted += new
RunWorkerCompletedEventHa
ndler();
3,
backgroundWorker1.DoWork
= new
DoWorkEventHandler(backgro
undWorker1_DoWork);
this.backgroundWorker1.Run
WorkerCompleted = new
RunWorkerCompletedEventH
andler(backgroundWorker1_R
unWorkerCompleted);
4, backgroundWorker1.DoWork
+= new
DoWorkEventHandler(backgrou
ndWorker1_DoWork);
this.backgroundWorker1.RunW
orkerCompleted += new
RunWorkerCompletedEventHan
dler(backgroundWorker1_RunW
orkerCompleted);

163 You are working as a developer in nfoSol Corp. Your team a created an application for a grocery
store. The application must validate the customers who are regular members of the grocery store.
The regular customers are issued the membership cards that bear their name and card number.
You are asked to create an application that should validate the customer's name and card number
before allowing them to avail the discounts. The interface of your application must have the
validate button. Your application must have reference to the validation component created by your
team.
dentify the code snippet that you need to add to the click event of the validate button.
1, CardValidator Validator =
new CardValidator();
Validator.CardNumber =
TextCard.Text;
Validator.CustomerName =
TextCustName.Text;
Validator.Validate();
if (Validator.Validate() ==
true)
MessageBox.Show("Valid
card Number");
ifValidator.Validate() ==
false)
MessageBox.Show("nvalid
Card Number");
2, CardValidator Validator =
new CardValidator();
Validator.CardNumber =
TextCard.Text;
Validator.CustomerName =
TextCustName.Text;
if (Validator.Validate() ==
true)
MessageBox.Show("Valid card
Number");
else
MessageBox.Show("nvalid
Card Number");
3, CardValidator Validator =
new CardValidator();
Validator.CardNumber =
TextCard.Text;
Validator.CustomerName =
TextCustName.Text;
Validator.Validate();
if (Validator.Validate() ==
true)
MessageBox.Show("Valid
card Number");
else
MessageBox.Show("nvalid
Card Number");
4, CardValidator Validator =
new CardValidator();
CardNumber = TextCard.Text;
CustomerName =
TextCustName.Text;
Validator.Validate();
if (Validator.Validate() == true)
MessageBox.Show("Valid card
Number");
else
MessageBox.Show("nvalid
Card Number");
3
164 You are working as a developer in nfosol corp. You are asked to create a Windows-based
application for a university which is conducting an entrance exam. The application must validate
the age of the students before accepting their forms. The age of the students should not be less
than 18 and more than 21. For that you need to create a class named Student and use Get and
Set methods to validate the age. dentify the code snippet that you need to use.
1, class Student
{
private int age;
public int StudentAge
{
get
{
return(age);
}
set
{
if ((value > 17) && (value <
22))
age = value;
else
MessageBox.Show("Age
should be between 18 years
and 21 years");
}}}
2, class Student
{
private int age;
public int StudentAge()
{
get
{
return(age);
}
set
{
if ((value > 17) && (value <
22))
age = value;
else
MessageBox.Show("Age
should be between 18 years
and 21 years");
}}}
3, class Student
{
public int age;
public int StudentAge
{
get
{
return(age);
}
set
{
if ((value > 17) && (value <
22))
age = value;
else{
MessageBox.Show("Age
should be between 18 years
and 21 years");
}}}
4, class Student
{
private int age;
public int StudentAge()
{
get()
{
return(age);
}
set()
{
if ((value > 17) && (value <
22))
age = value;
else
MessageBox.Show("Age should
be between 18 years and 21
years");
}}}
1
165 You are working as an application developer in nfosol Corp. You are asked to create an
application whose interface must have a Calendar control. The Toolbox window of the Visual
Studio DE does not show the Calendar control. So you decide to add the Calendar control to the
Toolbox window by selecting it from the Choose Toolbox tems dialog box. After the Calendar
control is added to the Toolbox window, you can drag it to the form present in your application.
When you add the Calendar control to the application, there are two assemblies that are
automatically created and added to your application. dentify those assemblies.
1, Axnterop.MSACAL and
MSACAL
2, stdole and System 3, MSACAL and stdole 4, Axnterop.MSACAL and
stdole
1
166 Which of the following statements you need to write in your Windows application code to use the
Form class?
1,
System.Windows.Form.Form
2,
System.Windows.Form.Forms
3,
System.Windows.Forms.Form
4,
System.Windows.Forms.Forms
3
167 __________ are loaded and executed within the process space of the host application. 1, n-process components 2, Out-of-process components 3, Public constructors 4, nternal constructors 1
168 ______________ can be used in a component if you want to use it only inside the component
class.
1, Copy constructors 2, Public constructors 3, nternal constructors 4, Private constructors 4
169 When the ___________ method is called, the application will continue to run without interruption
until the MethodNameCompleted event is raised.
1, MethodNameAsync() 2, WaitForExit() 3, RunWorkerAsync() 4, CancelAsync() 1
170 Which of the following classes, of the System.Threading namespace, limits the number of threads
that can access a resource or pool of resources concurrently?
1, Semaphore class 2, ThreadPool class 3, ReaderWriterLock class 4, Monitor class 1
You are asked to create an Out-of-process component that should enable the communication
between an application and a database. Which of the following component types you will create?
1, Nonvisual component 2, Visual component 3, n-process component 4, AdRotator component
You are asked to create a .NET component that should have constructor to allow the developers to
create instances of the component. Which of the following types of the constructor you need to
create?
1, nternal constructors 2, Public constructors 3, Private constructors 4, Protected constructors
You are asked to create a composite control for a Windows-based application. Which of the
following classes you need to use to inherit for creating the composite control?
1,
System.Windows.Forms.User
Control
2,
System.Windows.Forms.Butto
n
3,
System.Windows.Forms.Contr
ol
4,
System.Windows.Forms.TextBo
x

You are asked to create a Windows-based application that is implementing multiple threading by
using the System.Threading namespace. You need to control the access to objects by granting a
lock for an object to a single thread. Which of the following classes of the System.Threading
namespace you need to use in your application?
1, Monitor class 2, ThreadPool class 3, Mutex class 4, Semaphore class
You are asked to create an application that should allow simultaneous execution of multiple tasks
by using the various methods and events of the BackgroundWorker component. Which of the
following methods you need to use to accomplish the desired task?
1, Worker() 2, CancelAsync() 3, RunWorkerAsync() 4, Dispose()
Anthony is working as a developer in nfoSol Corp. He is asked to add a file type to the
deployment project. He decides to perform the following steps:
1. Select the File Types on Target Machine node in the File Types editor.
2. Select Action-->Add File Type to add a new file type. Type the name of the document type in
the name text box.
3. Select the newly created file type to associate extensions with the file type, Press the F4 key to
open the Properties window.
4. Select the Extensions property and specify the file extensions to be associated with the file
type.
5. Select the Command property in the Properties window to associate the file type with an
executable file. The Select tem in Project dialog box opens
6. Select the executable file to be associated with the file type.
However, his manager informs him that the preceding steps will not give the desired results. Do
you agree?
1, No. The steps given are
correct.
2, Yes. The step 6 should be
performed before step 4.
3, Yes. Step 3 should be
performed before step 2.
4, Step 4 should be performed
before step 2.

John is creating a deployment project. He is asked to search a specific file on the target machine
by using the Launch Conditions editor. He decides to perform the following steps:
1. Select the Requirements on Target Machine node in the Launch Conditions editor.
2. Select Action-->Add File Launch Condition.
3. Click the Search for File node, and press the F4 key to switch to the Properties window.
4. Select the FileName property in the Properties window, and type the name of the file, which you
want to search on the target computer.
5. Select the Folder property, and specify the folders where the search for the file should start.
6. Click the Condition node to display a customized error message, in case the file does not
exist.
7. Press the F4 key to view the properties for the Condition node. n the Message property, type
the error message to be displayed if the file does not
exist on the target computer.

However, his manager informs him that the preceding steps are not correct. Do you agree?
1, No. The given steps are
correct.
2, Yes. The step 5 should
come before the step 3.
3, Yes. The step 6 should
come before the step 3.
4, Yes. The step 3 should come
before the step 2.

John is working as a developer in nfosol Corp. He is asked to modify the application settings in
the application configuration file to change the way the application runs. He is asked to change the
URL where the assembly is stored. He decides to change the attribute of the <codeBase> element.

However, his manager tells him that he is not required to make any changes in the <codeBase>
element. Do you agree?
1, Yes. He should change the
oldVersion attribute of the
<bindingRedirect> element.
2, Yes. He should change the
privatePath attribute of the
<probing> element.
3, Yes. He should change the
apply attribute of the
<publisherPolicy> element.
4, No. John is right. He needs to
change the href attribute of the
<codeBase> element.

John is working as a developer in nfosol nc. He is asked to create an application that should
implement the role-based security. He uses the Windows Principal to implement the Windows-
based security. He writes the following code snippet in the application:
................
Windowsdentity wd = Windowsdentity.GetCurrent();
WindowsPrincipal = wPr.WindowsPrincipal(wd);
...............

He gets the compile time error. Help him by providing the correct code snippet.
1, Windowsdentity wd =
new Windowsdentity();
WindowsPrincipal wPr = new
WindowsPrincipal(wd);
2, Windowsdentity wd;
WindowsPrincipal wPr = new
WindowsPrincipal(wd);
3, Windowsdentity wd =
Windowsdentity.GetCurrent();

WindowsPrincipal wPr;
4, Windowsdentity wd =
Windowsdentity.GetCurrent();
WindowsPrincipal wPr = new
WindowsPrincipal(wd);

You are working as a developer in nfoGain nc. Your manager has asked you to create a Windows-
based application which should have the custom settings provided by the configuration file. The
application should be able to access at run time. You are asked to create two custom settings
'setting1' and 'setting2'. dentify the correct code snippet that you need to add to the configuration
file of the application.
1, <configuration>
<configSections>
<section name="mySection"
type="System.Configuration.
SingleTagSectionHandler"/>

<mySection setting1="a"
setting2="b" />
</configSections>
</configuration>
2, <configuration>
<configSections>
<section name="mySection"
type="System.Configuration.Si
ngleTagSectionHandler"/>
<mySection setting1="a"
setting2="b" />
</configuration>
</configSections>
3, <configuration>
<section name="mySection"
type="System.Configuration.S
ingleTagSectionHandler"/>
<configSections>
</configSections>
<mySection setting1="a"
setting2="b" />
</configuration>
4, <configuration>
<configSections>
<section name="mySection"
type="System.Configuration.Sin
gleTagSectionHandler"/>
</configSections>
<mySection setting1="a"
setting2="b" />
</configuration>

You are working as a developer in nfogain Corp. You are asked to create an application that uses
a specified version of the assembly, which is 1.0.0.0, at run time. However, the application needs
to be redirected to run against a newer version, which is 2.0.0.0, of the assembly. n addition, the
garbage collection should run concurrently on the same thread as that of the application. You need
to make the necessary changes in the configuration file to accomplish the desired task. dentify the
code snippet that you need to add to the configuration file.
1, <configuration>
<runtime>
<gcConcurrent
enabled="true"/>
</runtime>
<assemblyBinding
xmlns="urn:schemas-
microsoft-com:asm.v1">
<dependentAssembly>
<assemblydentity
name="myAssembly"
publicKeyToken="32ab4ba45
e0a69a1" culture="neutral"
/>
<bindingRedirect
oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</configuration>
2, <configuration>
<runtime>
<assemblyBinding
xmlns="urn:schemas-microsoft-
com:asm.v1">
<dependentAssembly>
<gcConcurrent
enabled="true"/>
<assemblydentity
name="myAssembly"
publicKeyToken="32ab4ba45e
0a69a1" culture="neutral" />
<bindingRedirect
oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
3, <configuration>
<runtime>
<gcConcurrent
enabled="true"/>
<assemblyBinding
xmlns="urn:schemas-
microsoft-com:asm.v1">
<assemblydentity
name="myAssembly"
publicKeyToken="32ab4ba45e
0a69a1" culture="neutral" />
<bindingRedirect
oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</assemblyBinding>
</runtime>
</configuration>
4, <configuration>
<runtime>
<gcConcurrent
enabled="true"/>
<assemblyBinding
xmlns="urn:schemas-microsoft-
com:asm.v1">
<dependentAssembly>
<assemblydentity
name="myAssembly"
publicKeyToken="32ab4ba45e0
a69a1" culture="neutral" />
<bindingRedirect
oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

You are working as a developer in nfogain Corp. You are asked to create an application that
should have implemented the Windows nstaller launch condition. dentify the correct steps that
you need to perform to add a Windows nstaller launch condition.
1, 1. Select the Requirements
on Target Machine node in
the Launch Conditions
editor.
2. Select Action-->Add
Windows nstaller Launch
Condition.
3. Click the Search for
Component node, and press
the F4 key to switch to the
Properties window.
4. Select the ComponentD
property, and type the D of
the component to be
searched on the target
computer.
5. Select the Condition node
corresponding to the Search
for Component node.
6. Press the F4 key to open
the Properties window.
7. Type the error message in
the Message property, to be
displayed if the component
does not exist on the target
computer.
2, 1. Select the Requirements
on Target Machine node in the
Launch Conditions editor.
2. Press the F4 key to open the
Properties window.
3. Select Action-->Add
Windows nstaller Launch
Condition.
4. Click the Search for
Component node, and press
the F4 key to switch to the
Properties window.
5. Select the ComponentD
property, and type the D of the
component to be searched on
the target computer.
6. Select the Condition node
corresponding to the Search
for Component node.
7. Type the error message in
the Message property, to be
displayed if the component
does not exist on the target
computer.
3, 1. Select the Requirements
on Target Machine node in the
Launch Conditions editor.
2. Select Action-->Add
Windows nstaller Launch
Condition.
3. Select the ComponentD
property, and type the D of
the component to be searched
on the target computer.
4. Select the Condition node
corresponding to the Search
for Component node.
5. Press the F4 key to open
the Properties window.
6. Click the Search for
Component node, and press
the F4 key to switch to the
Properties window.
7. Type the error message in
the Message property, to be
displayed if the component
does not exist on the target
computer.
4, 1. Select Action-->Add
Windows nstaller Launch
Condition.
2. Select the Requirements on
Target Machine node in the
Launch Conditions editor.
3. Click the Search for
Component node, and press the
F4 key to switch to the
Properties window.
4. Select the ComponentD
property, and type the D of the
component to be searched on
the target computer.
5. Select the Condition node
corresponding to the Search for
Component node.
6. Press the F4 key to open the
Properties window.
7. Type the error message in
the Message property, to be
displayed if the component does
not exist on the target computer.

You are working as a developer in nfoSol nc. You are asked to create a deployment project that
should include the File Types Editor to enable the users to add or remove files. dentify the steps
that you need to perform to include the file type to the deployment project.
1, 1. Select the File Types on
Target Machine node in the
File Types editor.
2. Select Action-->Add File
Type to add a new file type.
Type the name of the
document type in the name
text box.
3. Select the newly created
file type to associate
extensions with the file type,
Press the F4 key to open the
Properties window.
4. Select the Extensions
property and specify the file
extensions to be associated
with the file type.
5. Select the Command
property in the Properties
window to associate the file
type with an executable file.
The Select tem in Project
dialog box opens.
6. Select the executable file
to be associated with the file
type.
2, 1. Select Action-->Add File
Type to add a new file type.
Type the name of the
document type in the name
text box.
2. Select the File Types on
Target Machine node in the
File Types editor.
3. Select the newly created file
type to associate extensions
with the file type, Press the F4
key to open the Properties
window.
4. Select the Extensions
property and specify the file
extensions to be associated
with the file type.
5. Select the Command
property in the Properties
window to associate the file
type with an executable file.
The Select tem in Project
dialog box opens.
6. Select the executable file to
be associated with the file type.
3, 1. Select the File Types on
Target Machine node in the
File Types editor.
2. Select Action-->Add File
Type to add a new file type.
Type the name of the
document type in the name
text box.
3. Select the executable file to
be associated with the file
type.
4. Select the newly created
file type to associate
extensions with the file type,
Press the F4 key to open the
Properties window.
5. Select the Extensions
property and specify the file
extensions to be associated
with the file type.
6. Select the Command
property in the Properties
window to associate the file
type with an executable file.
The Select tem in Project
dialog box opens.
4, 1. Select the File Types on
Target Machine node in the File
Types editor.
2. Select the newly created file
type to associate extensions
with the file type, Press the F4
key to open the Properties
window.
3. Select Action-->Add File
Type to add a new file type.
Type the name of the document
type in the name text box.
4. Select the Extensions
property and specify the file
extensions to be associated with
the file type.
5. Select the Command
property in the Properties
window to associate the file type
with an executable file. The
Select tem in Project dialog
box opens.
6. Select the executable file to
be associated with the file type.

184 You are working as a developer in nfosol nc. You are part of the team that is developing a
deployment project for the application that is created by the team. You are asked to set the
environment variable named PATH on each target machine on which your application will execute.
dentify the steps that you need to perform to accomplish the desired task.
1, 1. Select the
HKEY_CURRENT_USER
key in the Registry editor.
2. n the Action menu, select
New-->String Value. Change
the name of the newly
created value to PATH.
3. Select Action-->New Key.
Change the name of the new
key to ENVRONMENT.
4. Select the
ENVRONMENT key.
5. Select PATH, and press
the F4 key to switch to the
Properties window. Set the
Value property to
C:\;C:\Windows.
2, 1. Select the
HKEY_CURRENT_USER key
in the Registry editor.
2. Select Action-->New Key.
Change the name of the new
key to ENVRONMENT.
3. Select the ENVRONMENT
key.
4. n the Action menu, select
New-->String Value. Change
the name of the newly created
value to PATH.
5. Select PATH, and press the
F4 key to switch to the
Properties window. Set the
Value property to
C:\;C:\Windows.
3, 1. Select the
HKEY_CURRENT_USER key
in the Registry editor.
2. Select Action-->New Key.
Change the name of the new
key to ENVRONMENT.
3. n the Action menu, select
New-->String Value. Change
the name of the newly created
value to PATH.
4. Select the ENVRONMENT
key.
5. Select PATH, and press the
F4 key to switch to the
Properties window. Set the
Value property to
C:\;C:\Windows.
4, 1. Select the
HKEY_CURRENT_USER key in
the Registry editor.
2. n the Action menu, select
New-->String Value. Change the
name of the newly created
value to PATH.
3. Select PATH, and press the
F4 key to switch to the
Properties window. Set the
Value property to
C:\;C:\Windows.
4. Select Action-->New Key.
Change the name of the new
key to ENVRONMENT.
5. Select the ENVRONMENT
key.
2
185 Programs and Iibraries for .NET are packaged into units caIIed ________. 1, GIobaI AssembIy Cache 2, AssembIies 3, Resources 4, Manifest 2
186 Which of the following commands is required to create a strong-named key pair and store it in a
file using the sn.exe utility?
1, sn -k filename.snk 2, sn -k filename 3, sn +k filename.snk 4, sn k filename.snk 1
187 Which of the following options can be used with the gacutil command to register the assembly to
the GAC?
1, /L 2, / 3, /u 4, /U 2
188 Using the Visual Studio .NET deployment tools, you can deploy the applications that cannot be
deployed by using the ______ command.
1, sn -k filename.snk 2, Ldasm <assembly name> 3, gacutil 4, XCOPY 4
189 Which of the following registry keys stores information about file extensions and their association
with executable files?
1, HKEY_CLASSES_ROOT 2, HKEY_USERS 3, HKEY_CURRENT_USER 4, HKEY_LOCAL_MACHNE 1
190 The Custom Actions editor contains ___________ sections. 1, Five 2, Two 3, Three 4, Four 4
191 Which of the following elements is the root element of every configuration file used by the CLR
and .NET Framework applications?
1, <dependentAssembly> 2, <assemblyBinding
xmlns="urn:schemas-microsoft-
com:asm.v1">
3, <runtime> 4, <configuration> 4
192 Which of the following section handlers of the .NET Framework returns a key-value pair
configuration setting?
1, SingleTagSectionHandler 2, DictionarySectionHandler 3, gnoreSectionHandler 4, NameValueSectionHandler 2
193 Which of the following permission sets is the default permission set for all code that runs from an
unknown location or origin?
1, FullTrust 2, Everything 3, Localntranet 4, nternet 4
194 ___________ is the procedure of finding whether a user has rights to perform a specific action or
not.
1, Authorization 2, Authentication 3, Windows dentity 4, Generic dentity 1
195 You are asked to create an assembly by using the Visual Studio .NET DE for VC#. dentify the
type of assembly that you can create.
1, Shared assembly 2, Private assembly 3, Multifile assembly 4, Single-File assembly 4
196 You are provided with the version number of an assembly, 6.4.0.3. dentify the minor version
number.
1, 3 2, 0 3, 4 4, 6 3
197 You are asked to create the deployment project. You need to add the .exe and .dll files to the
deployment project. Which of the following editors you need to use to accomplish the desired task?
1, Registry Editor 2, File System Editor 3, User nterface Editor 4, File Types Editor 2
198 You are asked to put the settings, of the third-party component used by both the client application
and server application, at one place. n which of the following files, you will put the information
about the component?
1, Extensible Markup
Language (XML) files
2, Application Configuration
Files
3, Machine Configuration Files 4, Security Configuration Files 3
199 You are asked to access configuration settings from the application. Which of the following
methods you need to use to accomplish the desired task?
1,
ConfigurationSettings.AppSet
tings()
2, Configuration.AppSettings() 3, Configuration.GetConfig() 4,
ConfigurationSettings.GetConfig
()
4
John is working as an application developer in nfosol nc. He is creating a deployment project. He
is asked to add a sub folder to the deployment project with the help of the File System editor. He
performs the following steps to add the sub folder:
1. Select a folder in the File System editor.
2. Select Action-->Add Special Folder-->Custom Folder.
3. Type the name of the newly created subfolder.

However, he finds that the desired folder is not created. Help him to identify the error he made.
1, Second step is not correct.
He should perform the
following step:
Select Action-->Add Special
Folder-->Folder
2, Second step is not correct.
He should perform the
following step:
Select Action-->Add Special
Folder
3, First step is not correct. He
should perform the following
step:
Select the File System on
Target Machine node.
4, The second step is not
correct. He should perform the
following step:
Select Action-->Add-->Folder

You might also like