You are on page 1of 51

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

The
application should convert the age from character data type to integer data typ
e. Which of the following functions you need to use to accomplish the desired ta
sk?
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 collect
ion 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 les
s demand of the subject, the university dropped the course from its IT curriculu
m. This resulted in modification of the complete IT curriculum. Identify the typ
e of entity that the Visual Basic course is.
1, Independent entity 2, Dependent entity
3, Weak entity 4, Subentity
1
4 A computer institute offers courses on various programming languages for stude
nts. The students can select any number of offered courses. Which type of relati
onship exists between the students and offered courses?
1, One-to-Many Relationship 2, Many-to-One relationship
3, Many-to-Many Relationship 4, One-to-One relationship
3
5 Sam is accessing a table that contains details of all the employees of his org
anization. He needs to retrieve the details of those employees who have more tha
n $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, UNION 3, DIVIDE 4, RESTRICT
4
6 Smith works as a Manager in TechnoWorld, Inc. He manages and evaluates the per
formance of his team. Identify the entities and relationship in the given scenar
io.
"1, Entities: Smith, teamRelationship: manage"
"2, Entities: SmithRelationship: manage and evaluate"
"3, Entities: Smith, teamRelationship: evaluate"
"4, Entities: Smith, teamRelationship: manage and evaluate"
4
7 Idntify the type of relationship in the following sentence: Software engineers
can work on various programming languages.
1, One-to-One Relationship 2, Many-to-One Relationship
3, One-to-Many Relationship 4, Many-to-Many Relationship
4
8 There are _______ types of relationships that exist between entities.
1, one 2, two 3, three 4, four
3
9 Peter is working as a Senior Software Engineer in NewSol, Inc. His Employee ID
is N0065. He joined the organization on 19 Aug, 2008. Identify the attributes o
f the entity instance.
1, Date of joining(19 Aug, 2008), Employee_ID(N0065), and Designation(Senior Sof
tware Engineer).
2, Employee_ID(N0065) and Designation(Senior Software Engineer).
3, Date of joining(19 Aug, 2008) and Employee_ID(N0065)
4, Employee_ID (N0065)
1
10 Peter has been given a task to simplify a database structure. He has to repre
sent 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 m
anager 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 u
se.
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 Em
ployee Details table contains employee ID, employee name, department ID, and des
ignation of all employees. The Department Details table contains department ID
and department names. Sam has to retrieve the name of the department that has th
e maximum number of employees working. Which operator should Sam select for the
given scenario?
1, Join 2, Intersect 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 structu
res 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 t
o be in the ______ normal form.
1, first 2, second 3, third 4, Boyce-Codd
1
15 Jim works as a database administrator in TechnoSol, Inc. 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 th
e details of Employee ID, Department ID, meeting date, and location of the meeti
ng. On analyzing the table he found that meeting date and location of the meetin
g columns consist of more than one value in each cell. Jim has decided to normal
ize 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. Analy
ze 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. Ident
ify 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 appl
ied 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 a
nd 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 a
ppeared 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 th
at any modification in Student Name column will lead to modification in the whol
e table and Student Name + Exam Code can also be chosen as the primary key. To a
void 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 ma
p the given ER diagram to its corresponding tables. On analyzing the whole ER di
agram, he is planning to create a table called Account Details. However, his col
league has advice him that creating only one table will not give the desired res
ult. 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 b
oth 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, It identifies its owner entity.
2, It refers to another entity.
3, It simplifies the description of an entity.
4, It cannot refer to another entity.
4
27 "The Employee_Details table lists the details of an employee. If Employee ID
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 ID 4, Phone Number
2
28 In 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. Whic
h 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 ID +Account Number
2, Employee ID + Department ID +Account Number
3, Employee ID+ Department ID + Designation ID
4, Employee ID+ Department ID + Designation ID +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 ID + Project Code. Ryan is thinking of a
pplying third normal form to simplify the table structure. On discussing with hi
s senior, he found that his decision of selecting the third normal form is not c
orrect. Analyze the given table and identify which normal form should Ryan selec
t.
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 d
epartments. He has to normalize that table. The primary key of that table is Emp
loyee ID. Which normal form should he choose to simplify the table? Click the Ex
hibit 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 wa
nts to end the chat session. Which of the following commands would help him do s
o?
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. Identify th
e correct sequence of steps that she needs to follow to communicate with the bac
k office.
"1, 1. Identify the user with whom she needs to communicate.
2. Check whether the user is online and ready to receive messages.
3. Identify the mechanism for communication.
4. Identify the contents of the message."
"2, 1. Identify the user with whom she needs to communicate.
2. Identify the mechanism for communication.
3. Check whether the user is online and ready to receive messages.
4. Identify the contents of the message."
"3, 1. Identify the mechanism for communication.
2. Identify the user with whom she needs to communicate.
3. Check whether the user is online and ready to receive messages.
4. Identify the contents of the message."
"4, 1. Identify the contents of the message.
2. Identify the user with whom she needs to communicate.
3. Check whether the user is online and ready to receive messages.
4. Identify the mechanism for communication."
1
35 "Joe is working on a Linux system. He has to chat with Angela. He first want
s 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:
whoHowever, the preceding command displays the list of currently logged on users
. This list does not indicate whether the user is ready to receive messages. Ide
ntify 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. Identify 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 I.
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 Inbox to read m
ails. She invoked the pine MUA and pressed the S key to display the list of fold
ers. Analyze whether Julia has pressed the correct key to display the list of fo
lders. If 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 I 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 ver
ify 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 Inbox.
3
42 You have sent an E-mail to your friend by using the pine utility of Linux. Af
ter you have sent the mail, its copy is saved automatically in the sent-mail fol
der. Now, you need to verify this by checking the content of the sent-mail folde
r. 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 p
ress 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 p
ress 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 p
ress Enter.
3. Press the M key."
"4, 1. Select the sent-mail option from the Folders List by using the Tab key, a
nd 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. Ident
ify 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 backsl
ash.
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 Insert m
ode 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 fil
e 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 cur
rent 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 curso
r moved to the first line instead of the third line. Analyze the situation and p
rovide the correct command that should have been used to move the cursor from th
e 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 curren
tly in the bill directory. Which of the following commands would you use for thi
s 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 /ho
me/math directory to the /home/backup directory. You are currently in the math d
irectory. Which of the following commands would you use to perform this task?
1, cp /home/math/math00[1*3].2009 /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 n
eed to rename the file to myfile002.txt. You are currently in the mydir director
y. 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 requ
ired task. If 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/myfile00
2.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/myfile00
2.txt"
2
52 ABC Bank is offering personal loans to its customers at reduced interest rat
es. This offer is valid for only a limited period. The bank intends to use a sof
tware 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 chang
ed to the original values. The bank does not want to modify the complete softwar
e application as a result of change in such loan details. Identify the tier on w
hich 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 Fra
mework?
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 p
rogramming 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. Unde
r which of the following options is the statement being used by Jonathan include
d?
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 ret
urns 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 Ids 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 LoginID, convert(char,BirthDate) AS 'Birth Date' FROM HumanResources.E
mployee
"2,SELECT LoginID, convert(char,BirthDate,2) AS 'Birth Date' FROMHumanResources.
Employee"
3, SELECT LoginID, convert(char(2),BirthDate) AS 'Birth Date' FROM HumanResource
s.Employee
"4, SELECT LoginID, convert(BirthDate(2), char(6)) AS 'Birth Date'FROM HumanReso
urces.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, PIVOT
1
60 The _______ join displays the result set containing all the rows from one tab
le 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 ma
ximum 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 EmpID and EmpTitle columns. You have to write a query that display
s Employee ID and title under the column headings, Employee ID and Designation,
respectively. Which of the following SQL queries would you use to perform the re
quired task?
1, SELECT EmpID 'Employee ID', EmpTitle 'Designation' FROM HumanResources.Employ
ee
"2, SELECT 'Employee ID' EmpID, 'Designation' EmpTitle FROM HumanResources.Emplo
yee"
3, SELECT EmpID = 'Employee ID', EmpTitle = 'Designation' FROM HumanResources.Em
ployee
"4, SELECT 'Employee ID' AS EmpID, 'Designation' AS EmpTitle FROM HumanResources
.Employee"
1
63 You have to create a report containing the Employee ID, title, and total leav
es of those employees whose total leaves are not greater than 20. Which of the f
ollowing SQL queries would you use to create this report?
"1, SELECT EmployeeID, Title, TotalLeaves FROM
HumanResources.Employee WHERE TotalLeaves >20"
"2, SELECT EmployeeID, Title, TotalLeaves FROM
HumanResources.Employee WHERE TotalLeaves != 20"
"3, SELECT EmployeeID, Title, TotalLeaves FROM
HumanResources.Employee WHERE TotalLeaves < 20"
"4, SELECT EmployeeID, Title, TotalLeaves FROM
HumanResources.Employee WHERE TotalLeaves <= 20"
4
64 You have to retrieve the Name, DepartmentID, and GroupName columns from the D
epartment table. The data of the Name column should be displayed in capital lett
ers with a user-defined heading, Department Name. Which of the following SQL que
ries would you use to retrieve the required information in the desired format?
"1, SELECT upper(Name), DepartmentID, GroupName FROM HumanResources.Department"
"2, SELECT 'Department Name'= Name, DepartmentID, GroupName FROM HumanResources.
Department"
3, SELECT 'Department Name'= patindex(Name), DepartmentID,GroupNameFROM
HumanResources.Department
4, SELECT 'Department Name'= upper(Name), DepartmentID, GroupName FROM HumanReso
urces.Department
4
65 You need to create a report containing the product ID along with their list p
rices. 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. In addition, if
two products have the same list price, they should be given the same rank. Howev
er, 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 ProductId, ListPrice, rank() OVER(ORDER BY ListPrice desc) AS rank
FROM Production.Product"
"2, SELECT ProductId, ListPrice, dense_rank() OVER(ORDER BY ListPrice desc)AS ra
nk
FROM Production.Product"
"3, SELECT ProductId, ListPrice, row_number() OVER(ORDER BY ListPrice asc) AS ra
nk
FROM Production.Product"
"4, SELECT ProductId, ListPrice, rank() OVER(ORDER BY ListPrice asc) AS rank
FROM Production.Product"
2
66 You have to display a report that contains the Employee ID and the name of de
partment for each employee. The Employee ID is stored in the EmployeeDepartmentH
istory table, and the department name is stored in the Department table. The Dep
artment and EmployeeDepartmentHistory tables contain a common column, Department
ID. Which of the following SQL queries would you use to display the required rep
ort?
"1, SELECT e.EmployeeID, d.Name FROM HumanResources.Department d JOIN HumanResou
rces.EmployeeDepartmentHistory e ON e.DepartmentID = d.DepartmentID"
"2, SELECT e.EmployeeID, d.Name FROM HumanResources.Department d OUTER JOIN Huma
nResources.EmployeeDepartmentHistory e ON e.DepartmentID = d.DepartmentID"
"3, SELECT e.EmployeeID, d.Name FROM HumanResources.Department d
EQUI JOIN HumanResources.EmployeeDepartmentHistory e ON e.DepartmentID = d.Depar
tmentID"
"4, SELECT e.EmployeeID, d.Name FROM HumanResources.Department d CROSS JOIN Huma
nResources.EmployeeDepartmentHistory e ON e.DepartmentID = d.DepartmentID"
1
67 "You have to create a report that displays the number of years an employee h
as been working with the organization. For this, you created the following SQL q
uery:
SELECT datepart (yy, HireDate, getdate()) AS 'Age'
FROM HumanResources.Employee
However, the preceding query does not compile. Identify the reason and provide t
he correct solution."
"1, SELECT datepart (yy, HireDate) AS 'Age'FROM HumanResources.Employee"
"2, SELECT datediff (yy, HireDate, getdate()) AS 'Age'FROM HumanResources.Employ
ee"
"3, SELECT dateadd (yy, HireDate, getdate()) AS 'Age'FROM HumanResources.Employe
e"
"4, SELECT day (HireDate) AS 'Age'FROM HumanResources.Employee"
2
68 "You have to create a report that displays the EmployeeID of all the employee
s, who live in the Bothell city, from the EmployeeAddress table. For this, you c
reated the following SQL query:
SELECT EmployeeID FROM HumanResources.EmployeeAddress WHERE AddressID
= (SELECT AddressID FROM Person.Address WHERE City = 'Bothell')
However, the preceding query gives an error ""Subquery returned more than 1 valu
e"". Provide the correct solution for this problem."
"1, SELECT EmployeeID FROM HumanResources.EmployeeAddress WHERE AddressIDIN (SEL
ECT AddressID FROM Person.Address WHERE City = 'Bothell')"
2, SELECT EmployeeID FROM HumanResources.EmployeeAddress WHERE AddressID EXISTS
(SELECT AddressID FROM Person.Address WHERE City = 'Bothell')
3, SELECT AddressID FROM Person.Address WHERE City = 'Bothell'
4, SELECT EmployeeID FROM HumanResources.EmployeeAddress e JOIN Person.Address a
ON e.AddressID=a.AddressID
1
69 "You have to create a report that displays the Employee ID and the title of a
ll the employees whose sick leave hours are more than the sick leave hours of em
ployees designated as Stocker. For this, you used the following SQL query:
SELECT EmployeeID, 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 repor
t. If not, provide the correct solution."
1, Yes, the query will display the required report.
"2, No, the correct query is:SELECT EmployeeID, Title, SickLeaveHours
FROM HumanResources.Employee WHERE SickLeaveHours >ALL (SELECT SickLeaveHours
FROM HumanResources.Employee WHERE Title ='Stocker')"
"3, No, the correct query is:SELECT EmployeeID, Title, SickLeaveHoursFROM HumanR
esources.EmployeeWHERE SickLeaveHours <>ALL (SELECT SickLeaveHours
FROM HumanResources.Employee WHERE Title ='Stocker')"
"4, No, the correct query is SELECT EmployeeID, 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 EmployeeID of those employees
whose sick leave hours are greater than the average sick leave hours of employee
s with title as 'Network Administrator'. For this, you used the following SQL qu
ery:
SELECT EmployeeId 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 repor
t. If not, provide the correct solution."
1, Yes, the query will display the required report.
"2, No, the correct query is:SELECT EmployeeId FROM HumanResources.Employee WHER
E SickLeaveHours > (SELECT AVG(SickLeaveHours) FROM HumanResources.Employee WHER
E Title = 'Network Administrator')"
"3, No, the correct query is:SELECT EmployeeId FROM HumanResources.Employee WHER
E Avg(SickLeaveHours) > (SELECT SickLeaveHours FROM HumanResources.Employee WHER
E Title = 'Network Administrator')"
"4, No, the correct query is:SELECT EmployeeId FROM HumanResources.Employee WHER
E SickLeaveHours = (SELECT SickLeaveHours FROM HumanResources.Employee WHERE Tit
le = 'Network Administrator')"
2
71 "You have to create a report that displays all the titles of the employees al
ong 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 follow
ing 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 repor
t. If 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(Sick
LeaveHours) FROMHumanResources.Employee WHERE SickLeaveHours > 20 AND avg(SickLe
aveHours) >35
"3, No, the correct query is:SELECT Title, 'Average Sick Leave Hours' = avg(Sick
LeaveHours) FROM HumanResources.Employee WHERE avg(SickLeaveHours) >55"
"4, No, the correct query is:SELECT Title, 'Average Sick Leave Hours' = avg(Sick
LeaveHours) FROM HumanResources.Employee WHERE SickLeaveHours > 20 GROUP BY Titl
e HAVINGavg(SickLeaveHours) >35"
4
72 Which of the following databases acts as a template or a prototype for the ne
w 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 following stored procedures is used to rename a database in SQL
Server 2005?
1, sp_name 2, sp_helpdb 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 Ser
ver is used toadd 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. Whi
ch of the following constraints would you apply on the EmpPhone column to accomp
lish 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 wo
rking 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 ta
ble. 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 pric
e of one of the products has changed. You need to reflect this change in the Pro
ducts table. Which of the following statements allows you to perform this task?
1, UPDATE 2, ALTER 3, INSERT 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 mo
des of the FOR XML clause would you use to retrieve the XML data in the required
format?
1, RAW 2, AUTO 3, PATH 4, EXPLICIT
2
82 You have to create the Orders table in the database. The table contains three
columns: OrderID, OrderDate, and OrderPrice. The OrderID 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
(
OrderID int NOT NULL,
OrderDate datetime,
OrderPrice int
)"
"2, CREATE TABLE Orders
(
OrderID int NOT NULL,
OrderDate datetime,
OrderPrice int,
)"
"3, CREATE TABLE Orders
(
OrderID int,
OrderDate datetime,
OrderPrice int
)"
"4, CREATE TABLE Orders
(
OrderID int NULL,
OrderDate datetime,
OrderPrice int
)"
1
83 You have to create the EmpPayDetails table in the database. This table contai
ns 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 i
n the RateChangeDate column. The EmpPayDetails table needs to be partitioned bas
ed on the changes made in the payment rates of employees. For this, you have cre
ated a partition function and associated it with various filegroups by using the
partition scheme named RateChngDate. Which of the following statements would yo
u use to create the table that will store the partitioned records?
"1, Create Partition Table EmpPayDetails
(
EmployeeID int,
RateChangeDate datetime,
Rate money,
PayFrequency tinyint,
ModifiedDate datetime
)ON RateChngDate(RateChangeDate)"
"2, Create Table EmpPayDetails
(
EmployeeID int,
RateChangeDate datetime,
Rate money,
PayFrequency tinyint,
ModifiedDate datetime
)ON RateChngDate(RateChangeDate)"
"3, Create Table EmpPayDetails
(
EmployeeID int,
RateChangeDate datetime,
Rate money,
PayFrequency tinyint,
ModifiedDate datetime
)ON RateChngDate"
"4, Create Table EmpPayDetails
(
EmployeeID int,
RateChangeDate datetime,
Rate money,
PayFrequency tinyint,
ModifiedDate datetime
)ON RateChangeDate(RateChngDate)"
2
84 "You have to store the data in the following columns of the Address table in
the database:
AddressID
AddressLine1
AddressLine2
StateProvinceID
PostalCode
Which of the following statements would you use to perform this task?"
"1, INSERT Address (AddressID, AddressLine1, AddressLine2, StateProvinceID, Post
alCode)
VALUES (104, '24, Herbon Apts',' Arthor Lane', 56, '607009')"
2, INSERT INTO Address (104, '24, Herbon Apts',' Arthor Lane', 56, '607009')
3, INSERT VALUES (104, '24, Herbon Apts',' Arthor Lane', 56, '607009')
"4, INSERT 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 XM
L data needs to be stored in a database table. For this, you need to shred the X
ML document by using the OPENXML function. Identify the correct sequence of task
s 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 w
ith Employee ID as 1 or 2:
SELECT EmployeeID, ContactID, LoginID, Title
FROM HumanResources.Employee
WHERE EmployeeID=1 OR EmployeeID=2
FOR XML RAW
Predict the output of the preceding query."
"1, <row EmployeeID=""1"" ContactID=""1209"" LoginID=""adventure-works\guy1""
Title=""Production Technician - WC60"" />
<row EmployeeID=""2"" ContactID=""1030"" LoginID=""adventure-works\kevin0""
Title=""Marketing Assistant"" />"
"2, <row>
<EmployeeID>1</EmployeeID>
<ContactID>1209</ContactID>
<LoginID>adventure-works\guy1</LoginID>
<Title>Production Technician - WC60</Title>
</row>
<row>
<EmployeeID>2</EmployeeID>
<ContactID>1030</ContactID>
<LoginID>adventure-works\kevin0</LoginID>
<Title>Marketing Assistant</Title>
</row>"
"3, <Employee EmployeeID=""1"" ContactID=""1209"" LoginID=""adventure-works\
guy1"" Title=""Production Technician - WC60"" />
<Employee EmployeeID=""2"" ContactID=""1030"" LoginID=""adventure-works\
kevin0"" Title=""Marketing Assistant"" />"
"4, <Employee>
<EmployeeID>1</EmployeeID>
<ContactID>1209</ContactID>
<LoginID>adventure-works\guy1</LoginID>
<Title>Production Technician - WC60</Title>
</Employee>
<Employee>
<EmployeeID>2</EmployeeID>
<ContactID>1030</ContactID>
<LoginID>adventure-works\kevin0</LoginID>
<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, IF...ELSE 2, CASE 3, WHILE 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, Instead of Triggers
3, Nested Triggers 4, Recursive Triggers
1
91 Which of the following problems occurs in the database when two or more trans
actions try to modify the same row?
1, Lost updates 2, Uncommitted dependency
3, Inconsistent analysis 4, Phantom reads
1
92 You have to create a clustered index on the Employee table. While creating th
e 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 yo
u use to accomplish this while creating the clustered index?
1, PAD_INDEX 2, FILLFACTOR 3, ONLINE 4, DROP_EXISTING
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 XM
L 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 exec
ution plan.
2, If any compilation error occurs, none of the statements in the batch is execu
ted.
3, You can use the EXECUTE statement in a batch when it is not the first stateme
nt 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 u
pdate statements. You want that both update statements must execute as a single
logical unit of work to maintain data integrity. If any type of error occurs in
any of the update statements, none of the statements should be executed. Which o
f 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 accomp
lish this?
1, SET LOCK_TIMEOUT 5000 2, SET LOCK_TIMEOUT 500
3, SET LOCK_TIMEOUT 50 4, SET LOCK_TIMEOUT 5
1
97 Identify the correct sequence of tasks that you need to perform to confi
gure 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
98 "You have created a view in the database by using the following statements:
CREATE VIEW HumanResources.vwEmployeeDepData
AS
SELECT e.EmployeeID, MaritalStatus, DepartmentID
FROM HumanResources.Employee e JOIN
HumanResources.EmployeeDepartmentHistory d
ON e.EmployeeID = d.EmployeeID
Now, you want to create a clustered index on the vwEmployeeDepData view. For thi
s, you first need to bind the vwEmployeeDepData view to the schema of the underl
ying tables. Which of the following statements would you use to perform this tas
k?"
"1, CREATE VIEW HumanResources.vwEmployeeDepData WITH SCHEMABINDING
AS
SELECT e.EmployeeID, MaritalStatus, DepartmentIDFROM HumanResources.Employee e J
OIN
HumanResources.EmployeeDepartmentHistory dON e.EmployeeID = d.EmployeeID"
"2, ALTER VIEW HumanResources.vwEmployeeDepData WITH SCHEMABINDING
AS
SELECT e.EmployeeID, MaritalStatus, DepartmentIDFROM HumanResources.Employee e J
OIN
HumanResources.EmployeeDepartmentHistory dON e.EmployeeID = d.EmployeeID"
"3, ALTER VIEW HumanResources.vwEmployeeDepData WITH SCHEMA
AS
SELECT e.EmployeeID, MaritalStatus, DepartmentIDFROM HumanResources.Employee e J
OIN
HumanResources.EmployeeDepartmentHistory dON e.EmployeeID = d.EmployeeID"
"4, SELECT VIEW HumanResources.vwEmployeeDepData WITH SCHEMABINDING
AS
SELECT e.EmployeeID, MaritalStatus, DepartmentIDFROM HumanResources.Employee e J
OIN
HumanResources.EmployeeDepartmentHistory dON e.EmployeeID = d.EmployeeID"
2
99 The CustomerID attribute of the Customer table is an IDENTITY column and its
value cannot be specified while inserting a new record. If anyone specifies the
value for the CustomerID in the INSERT statement, an error will be generated. To
handle such errors, you decide to use the TRY and CATCH blocks. You want that w
hen an error occurs while inserting a record in the Customer table, the error me
ssage 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, BEGIN TRY INSERT INTO HumanResources.Customer
VALUES ('C001', 1979, 'robertl', 16, 'M')END TRY BEGIN CATCH SELECT 'There was a
n error! ' + ERROR_MESSAGE() AS ErrorMessage, ERROR_LINE() AS ErrorLine END CAT
CH GO"
"2, BEGIN TRY INSERT INTO HumanResources.Customer
VALUES ('C001', 1979, 'robertl', 16, 'M')END TRY BEGIN CATCH SELECT 'There was a
n error! ' + ERROR_MESSAGE() AS ErrorMessage, ERROR_NUMBER() AS ErrorLine END C
ATCH GO"
"3, BEGIN TRY INSERT INTO HumanResources.Customer
VALUES ('C001', 1979, 'robertl', 16, 'M')END TRY BEGIN CATCH SELECT 'There was a
n error! ' + ERROR() AS ErrorMessage, ERROR_NUMBER() AS ErrorLine END CATCH GO"
"4, BEGIN TRY INSERT INTO HumanResources.Customer
VALUES ('C001', 1979, 'robertl', 16, 'M') END TRY BEGIN CATCH SELECT 'There was
an error! ' + ERROR() AS ErrorMessage, ERROR_LINE() AS ErrorLine END CATCH GO"
1
100 "You have created following stored procedure in SQL Server:
CREATE PROCEDURE prcGetEmployeeDetail @EmpId int, @DepName char(50) OUTPUT, @Shi
ftId int OUTPUT
AS
BEGIN
IF EXISTS(SELECT * FROM HumanResources.Employee WHERE EmployeeID = @EmpId)
BEGIN
SELECT @DepName = d.Name, @ShiftId = h.ShiftID
FROM HumanResources.Department d JOIN
HumanResources.EmployeeDepartmentHistory h
ON d.DepartmentID = h.DepartmentID
WHERE EmployeeID = @EmpId AND h.Enddate IS NULL
RETURN 0
END
ELSE
RETURN 1
END
Now, you have to create another procedure that will call the prcGetEmployeeDetai
l procedure. Which of the following statements would you use to perform this tas
k?"
"1, CREATE PROCEDURE prcDisplayEmployeeStatus @EmpId int
AS
BEGIN
DECLARE @DepName char(50)
DECLARE @ShiftId int
DECLARE @ReturnValue int
EXEC @ReturnValue = prcGetEmployeeDetail @EmpId, @DepName OUTPUT, @ShiftId OUTPU
T
IF (@ReturnValue = 0)
BEGIN
PRINT 'The details of an employee with ID: ' + convert(char(10), @EmpId)
PRINT 'Department Name: ' + @DepName
PRINT 'Shift ID: ' + convert( char(1), @ShiftId)
END
ELSE
PRINT 'No records found for the given employee'
END"
"2, CREATE PROCEDURE prcDisplayEmployeeStatus @EmpId int
AS
BEGIN
DECLARE @DepName
DECLARE @ShiftId
DECLARE @ReturnValue
EXEC @ReturnValue = prcGetEmployeeDetail @EmpId, @DepName OUTPUT, @ShiftId OUTPU
T
IF (@ReturnValue = 0)
BEGIN
PRINT 'The details of an employee with ID: ' + convert(char(10), @EmpId)
PRINT 'Department Name: ' + @DepName
PRINT 'Shift ID: ' + convert( char(1), @ShiftId)
END
ELSE
PRINT 'No records found for the given employee'
END"
"3, CREATE PROCEDURE prcDisplayEmployeeStatus @EmpId int
BEGIN
DECLARE @DepName char(50)
DECLARE @ShiftId int
DECLARE @ReturnValue int
EXEC @ReturnValue = prcGetEmployeeDetail @EmpId, @DepName OUTPUT, @ShiftId OUTPU
T
IF (@ReturnValue = 0)
BEGIN
PRINT 'The details of an employee with ID: ' + convert(char(10), @EmpId)
PRINT 'Department Name: ' + @DepName
PRINT 'Shift ID: ' + convert( char(1), @ShiftId)
END
ELSE
PRINT 'No records found for the given employee'
END"
"4, CREATE PROCEDURE prcDisplayEmployeeStatus @EmpId int
AS
BEGIN
DECLARE @DepName char(50)
DECLARE @ShiftId int
EXEC @ReturnValue = prcGetEmployeeDetail @EmpId, @DepName OUTPUT, @ShiftId OUTPU
T
IF (@ReturnValue = 0)
BEGIN
PRINT 'The details of an employee with ID: ' + convert(char(10), @EmpId)
PRINT 'Department Name: ' + @DepName
PRINT 'Shift ID: ' + convert( char(1), @ShiftId)
END
ELSE
PRINT 'No records found for the given employee'
END"
1
101 You have to create an update trigger, trgMagic, on the EmployeeDepartmentHis
tory table. You want that whenever any update statement is fired on the Employee
DepartmentHistory table, the trgMagic trigger is executed and displays the previ
ous value in the table as well as the updated value. Which of the following stat
ements would you use to perform the required task?
"1, CREATE TRIGGER [HumanResources].[trgMagic] ON
[HumanResources].[EmployeeDepartmentHistory] OF UPDATE AS
BEGIN
SELECT * FROM Deleted
SELECT * FROM Inserted
END;"
"2, CREATE TRIGGER [HumanResources].[trgMagic] ON
[HumanResources].[EmployeeDepartmentHistory] FOR UPDATE AS
BEGIN
SELECT * FROM Deleted
SELECT * FROM Inserted
END;"
"3, CREATE TRIGGER [HumanResources].[trgMagic] ON
[HumanResources].[EmployeeDepartmentHistory] AFTER UPDATE AS
BEGIN
SELECT * FROM Deleted
SELECT * FROM Inserted
END;"
"4, CREATE TRIGGER [HumanResources].[trgMagic] ON
[HumanResources].[EmployeeDepartmentHistory]
INSTEAD OF UPDATE AS
BEGIN
SELECT * FROM Deleted
SELECT * FROM Inserted
END;"
3
102___________ is a set of functions that provide programmable logic used by cli
ent applications over the Internet.
1, Web service 2, Service-Oriented Architecture
3, HTTP 4, Personal Desktop Assistant
1
103___________ is an extension of distributed computing based on the request/rep
ly design pattern.
1, Web service 2, Service-Oriented Architecture
3, HTTP 4, SOAP
2
104 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, UDDI 4, HTTP
4
105 Which of the following database objects in the Service Broker architecture i
s an addressable endpoint for the conversations?
1, Message 2, Service 3, Contract 4, Queue
2
106 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 provid
ed 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, Trigg
er
1
107 You have to create Service Broker objects in the AdventureWorks database. Fo
r this, you first need to enable Service Broker in the database. Which of the fo
llowing statements can be used to enable Service Broker?
1, ALTER DATABASE AdventureWorks ENABLE_BROKER
2, ALTER AdventureWorks ENABLE_BROKER
3, ALTER DATABASE AdventureWorks ENABLE_SERVICE_BROKER
4, ALTER DATABASE AdventureWorks ENABLE_SERVICEBROKER
1
108 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. W
hich of the following statements can be used to create the message?
"1,CREATE MESSAGE TYPE myMessageVALIDATION = WELL_FORMED_XML"
2, CREATE MESSAGE TYPE myMessage
"3, CREATE MESSAGE TYPE myMessageVALIDATION = VALID_XML WITH SCHEMA COLLECTION"
"4, CREATE MESSAGE TYPE myMessageVALIDATION = EMPTY"
2
109 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 ex
changed between the two services. Which of the following objects needs to be cre
ated to accomplish this?
1, MessageType 2, Contract 3, Service 4, Queue
2
110 Which of the following statements will you use to enable the CLR integration
feature in the database?
"1, sp_configure CLR_ENABLED, 1;
GO
RECONFIGURE;
GO"
"2, sp_configure CLR ENABLED, 1;
GO
RECONFIGURE;
GO"
"3, sp_configure CLR_ENABLE, 1;
GO
RECONFIGURE;
GO"
"4, sp_configure ENABLE_CLR, 1;
GO
RECONFIGURE;
GO"
1
111 "You have created a .NET assembly named CLRIntegration.dll. You need to impo
rt this assembly in SQL Server database engine such that the .NET code is able t
o access any resource within or outside SQL Server. For this, you created the as
sembly object by using the following code:
CREATE ASSEMBLY CLRIntegration FROM
'C:\CLRIntegration.dll' WITH PERMISSION_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 CLRIntegration FROM
'C:\CLRIntegration.dll' WITH PERMISSION_SET = ANY"
"2, CREATE ASSEMBLY CLRIntegration FROM
'C:\CLRIntegration.dll' WITH PERMISSION_SET = EXTERNAL_ACCESS"
"3, CREATE ASSEMBLY CLRIntegration FROM
'C:\CLRIntegration.dll' WITH PERMISSION_SET = UNSAFE"
"4, CREATE ASSEMBLY CLRIntegration FROM
'C:\CLRIntegration.dll' WITH PERMISSION_SET = EXTERNAL"
3
112 "You have to create a contract to define an agreement between two services i
n 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 co
de:
CREATE CONTRACT sendContract
(
sendMessage SENT BY TARGET
);
However, the preceding code allows the message to be sent by the endpoint that i
s the target of the conversation. Analyze the problem and provide the correct so
lution."
"1, CREATE CONTRACT sendContract
(
sendMessage BY INITIATOR
);"
"2, CREATE CONTRACT sendContract
(
sendMessage SENT BY INITIATOR ONLY
);"
"3, CREATE CONTRACT sendContract
(
sendMessage SENT BY ANY
);"
"4, CREATE CONTRACT sendContract
(
sendMessage SENT BY INITIATOR
);"
4
113 ___________ 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
3
114 "You have created a procedure, getSalesDetails that returns a result set. Yo
u need to create an HTTP endpoint named sqlEndpoint to provide the getSalesDetai
ls procedure as a Web method. For this, you used the following statement in SQL
Server:
CREATE ENDPOINT sqlEndpoint
STATE = STARTED AS HTTP(
PATH = '/sql',
AUTHENTICATION = (INTEGRATED ),
PORTS = ( CLEAR ), SITE = 'SERVER' )
FOR SOAP (
WEBMETHOD 'getSqlInfo' (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 displa
yed:
Msg 7890, Level 16, State 1, Line 1
Identify 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 th
e following statement:PORTS = ( CLEAR ), Clear_Port = 8080, SITE = 'localhost' )
"
"2, This error occurs when the authentication type used is INTEGRATED. To resolv
e the error, you need to use the following statement:AUTHENTICATION = (BASIC)"
"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 fol
lowing statement:
SCHEMA= NONE"
"4, This error occurs when the WSDL document generation is not supported for thi
s endpoint. To resolve the error, you need to use the following statement:
WSDL = NONE"
1
115 "You have to create a service to be used by Service Broker to deliver messag
es to the correct queue within a database. The service will store all the messag
es in the queue named sendQueue. The contract for this service will be sendCont
ract. To create the service, you used the following statement:
CREATE SERVICE sendService
ON QUEUE
(sendContract) [dbo].[sendQueue]
However, the preceding statement displays a syntactical error. Analyze the state
ment and provide the correct solution."
"1, CREATE SERVICE sendService
ON QUEUE
[dbo].[sendQueue] (sendContract)"
"2, CREATE SERVICE sendService
ON QUEUE
[dbo].[sendQueue] CONTRACT (sendContract)"
"3, CREATE SERVICE sendService
ON QUEUE
[dbo].[sendQueue]"
"4, CREATE SERVICE sendService
ON CONTRACT
(sendContract) [dbo].[sendQueue]"
1
116 "You have to create a managed stored procedure to store the employee det
ails 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 Conve
rtXML.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() m
ethod contained in the ConvertXML.dll assembly. For this, you have used the foll
owing statement:
CREATE PROCEDURE clrproc AS EXTERNAL NAME
ConvertXML.[CLRStoredProcedure.XMLProc].convXml
Analyze the scenario and identify whether the preceding statement will create th
e required managed stored procedure. If not, provide the correct solution."
1, There is no error in the code and managed stored procedure will be createdsuc
cessfully.
"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 P
ROCEDURE clrproc AS EXTERNAL NAME ConvertXML.XMLProc.convXml"
"4, No, the correct statement to create the managed stored procedure is:CREATE P
ROCEDURE clrproc AS EXTERNAL NAME ConvertXMLAssembly.[CLRStoredProcedure.XMLProc
].convXml"
4
117 "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 na
me CalcSalAssembly. Now, you have to create a managed function named SalaryCalcu
lation that will refer to the calcSalary() method of the preceding assembly. Whi
ch of the following statements would you use to create the managed function?"
"1, CREATE FUNCTION SalaryCalculation(@EmpID as nVarchar(3))
AS EXTERNAL NAME CalcSalAssembly.[EmployeePay.Pay].calcSalary"
"2, CREATE FUNCTION SalaryCalculation RETURNS nVarchar
AS EXTERNAL NAME CalcSalAssembly.[EmployeePay.Pay].calcSalary"
"3, CREATE FUNCTION SalaryCalculation(@EmpID as nVarchar(3)) RETURNS nVarchar(10
)
AS EXTERNAL NAME CalcSal.[EmployeePay.Pay].calcSalary"
"4, CREATE FUNCTION SalaryCalculation(@EmpID as nVarchar(3))RETURNS nVarchar(10)

AS EXTERNAL NAME CalcSalAssembly.[EmployeePay.Pay].calcSalary"
4
118 "The UserNameAudit table in the database stores various details of the u
sers including the E-mail address. While inserting the users details, you need t
o validate the E-mail address to ensure that it is a valid E-mail address. You h
ave created the ValidateMail.dll assembly to implement the logic of validating t
he 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 na
me ValidateEmailAssembly. Now, you have to create a trigger that will refer to t
he MailValid() method of the preceding assembly. Which of the following statemen
ts would you use to create the managed trigger?"
"1, CREATE TRIGGER EmailValidation OF INSERT ON UserNameAudit
AS EXTERNAL NAME ValidateEmailAssembly.trgMail.MailValid"
"2, CREATE TRIGGER EmailValidation ON UserNameAudit FOR INSERT
AS EXTERNAL NAME ValidateEmailAssembly.trgMail.MailValid"
"3, CREATE TRIGGER EmailValidation FOR INSERT ON UserNameAudit
AS EXTERNAL NAME ValidateEmailAssembly.trgMail.MailValid"
"4, CREATE TRIGGER EmailValidation ON UserNameAudit FOR INSERT
AS EXTERNAL NAME ValidateEmailAssembly.trgMail"
2
119 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 ob
ject that is available to receive messages. Which of the following statements wo
uld you use to accomplish this task? 1, CREATE QUEUE sendQueue WITH STATUS =
ON
2, CREATE QUEUE sendQueue WITH STATUS = OFF RETENTION = ON
3, CREATE QUEUE sendQueue WITH ACTIVATION = ON
4, CREATE QUEUE sendQueue WITH ACTIVATION = ON RETENTION = ON
1
120 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 service
s. Now, you need to begin a conversation between the sendMessage and receiveMess
age services by using the sendContract contract. Which of the following statemen
ts would you use to accomplish this task?
"1, DECLARE @dialog_handle UNIQUEIDENTIFIER;BEGIN DIALOG CONVERSATION @dialog_ha
ndle FROM
SERVICE [sendMessage] TO SERVICE 'receiveMessage' ON CONTRACT [sendContract];"
"2, DECLARE @dialog_handle;BEGIN DIALOG CONVERSATION @dialog_handle FROM
SERVICE [sendMessage] TO SERVICE 'receiveMessage' ON CONTRACT [sendContract];"
"3, DECLARE @dialog_handle UNIQUEIDENTIFIER;BEGIN DIALOG CONVERSATION @dialog_ha
ndle FROM
SERVICE [sendMessage] TO SERVICE 'receiveMessage' ON [sendContract] CONTRACT;"
"4, DECLARE @dialog_handle UNIQUEIDENTIFIER;BEGIN CONVERSATION @dialog_handle FR
OM
SERVICE [sendMessage] TO SERVICE 'receiveMessage' ON CONTRACT [sendContract];"
1
121 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 conv
ersation. Now, you need to send and receive messages. Which of the following sta
tements would you use to send a message named sendMessage?
"1, SEND ON CONVERSATION@dialog_handle FOR MESSAGE TYPE [sendMessage]('<name>Joh
n</name>')"
"2, SEND ON CONVERSATION@dialog_handle MESSAGE TYPE [sendMessage]('<name>John</n
ame>')"
"3, SEND ON CONVERSATION@dialog_handle MESSAGE [sendMessage]('<name>John</name>'
)"
"4, SEND ON CONVERSATION@dialog_handle FOR MESSAGE [sendMessage]('<name>John</na
me>')"
2
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 for
m 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 f
ocus 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 desig
n time as well as at run time?
1, Sorted 2, SelectionMode 3, SelectedIndex 4, SelectedItem
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, ListB
ox 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.ToInt32 2, DateTime.Parse
3, Convert.ToInt32 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 Inc. You are asked to
create a Windows-based application that should have a single Form. The Form sho
uld contain multiple controls to take input from user. After creating the applic
ation, you compiled it. During compilation, you encountered few errors in your c
ode. 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 Inc. 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 fol
lowing code snippets, you need to write in your application to create the list o
f grocery items?
"1, .....................
.....................
listBox1.Items.Add(""Rice"");
listBox1.Items.Add(""Flour"");
...............................
........................................."
"2, ....................
......................
listBox1.Add(""Rice"");
listBox1.Add(""Flour"");
......................................
.................................."
"3, ....................
......................
comboBox1.Items.Add(""Rice"");
comboBox1.Items.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 cr
eate a Windows-based application for a school to gather the information about th
e 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 ap
propriate caption to the button control. Identify the code snippet that should b
e 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
133 "You are working as an application developer in InfoSol Inc. You are asked t
o develop a Windows-based application for a grocery store. The application shoul
d have an interface that should take the bill amount of the customers as input.
If the bill amount is greater than 500 dollars, a button control must be added t
o the Interface. 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 th
e customers who have made purchases more than 500 dollars. The customers must be
greeted with an appropriate message.
Identify the correct code to accomplish the desired task."
"1, public partial class Form1 : Form
{
int BillAmount;
Button btn = new Button();
public Form1()
{
InitializeComponent();
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(""Congratulations!!!!! You get ""+x+""% discount"");
}
private void button1_Click(object sender, EventArgs e)
{
BillAmount = Convert.ToInt32(textBox1.Text);
if (BillAmount > 500)
{
btn.Text = ""Click Me"";
}
}
}"
"2, public partial class Form1 : Form
{
int BillAmount;
Button btn = new Button();
public Form1()
{
InitializeComponent();

}
private void btn_Click(object sender, EventArgs e)
{
Random rnd = new Random();
int x = rnd.Next(5,35);
MessageBox.Show(""Congratulations!!!!! You get ""+x+""% discount"");
}
private void button1_Click(object sender, EventArgs e)
{
BillAmount = Convert.ToInt32(textBox1.Text);
if (BillAmount > 500)
{
btn.Text = ""Click Me"";
this.Controls.Add(btn);
}
}
}"
"3, public partial class Form1 : Form
{
int BillAmount;

public Form1()
{
InitializeComponent();
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(""Congratulations!!!!! You get ""+x+""% discount"");
}
private void button1_Click(object sender, EventArgs e)
{
BillAmount = Convert.ToInt32(textBox1.Text);
if (BillAmount > 500)
{
btn.Text = ""Click Me"";
this.Controls.Add(btn);
}
}
}" "
4, public partial class Form1 : Form
{
int BillAmount;
Button btn = new Button();
public Form1()
{
InitializeComponent();
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(""Congratulations!!!!! You get ""+x+""% discount"");
}
private void button1_Click(object sender, EventArgs e)
{
BillAmount = Convert.ToInt32(textBox1.Text);
if (BillAmount > 500)
{
btn.Text = ""Click Me"";
this.Controls.Add(btn);
}
}
}"
4
134 You are working as an application developer in CompSol Inc. You are asked to
create a Windows based application that should have the login form. The applica
tion should allow the user to create their login ID. You need to add a validatio
n check on the TextBox control that takes the password from the user. An appropr
iate message should be shown to the user if the length of the password is less t
han 6 characters. Which of the following code snippet you need to add to your ap
plication 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.ToInt32(textBox1.Text)<6)
{
MessageBox.Show(""Length of the Password is not valid"");
}"
"3, private void textBox1_Validating(object sender, CancelEventArgs e)
{
if(Convert.ToDateTime(textBox1.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"");
}"
4
135 You are developing a Windows-based application that creates the multiple obj
ects 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, JIT Compiler 4, Common Language Runtime
4
136 You are creating a Windows-based application. You need to drag multiple cont
rols 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 IDE you need to modify?
1, Floating 2, Auto hide 3, Tabbed navigation 4, Docking
2
137 You are asked to create a Windows-based application. The form of the applica
tion 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, BackgroundImage
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 oth
er applications or its caption should flash on the task bar. Which of the follow
ing 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, Textb
ox Control
1
140 __________ is a process by which an application in the Windows environme
nt 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 following types of CommonDialog classes can be used to chan
ge the size of the text in the Windows-based application?
1, ColorDialog Class 2, FontDialog Class 3, FileDialog Class 4, Print
Dialog Class
2
142 Which of the following properties is used to create an MDI parent form?
1, MergeIndex 2, MergeAction 3, ActiveMdiChild 4, IsMdiContainer
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 elemen
t in the user interface and reports it to accessibility aids?
1, AccessibleName 2, AccessibleDescription 3, AccessibleRole
4, TabIndex
3
146 You are working as an application developer in CompSol Inc. You are aske
d to create a Windows based application for children. Through the application, c
hildren will be able to learn about the color combinations. Your interface shoul
d have one TextBox control and two Button controls required to set the backgroun
d and foreground color of the text written in the TextBox control. Your applicat
ion should use the ColorDialog control to invoke the default Color dialog box. I
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
147 You are working as an application developer in InfoSol Inc. You are aske
d to create a Windows-based application for a school. The application should ena
ble 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
MDI parent form menu. When the user clicks the Student Details form, the Studen
t Details form should be displayed. The user should be able to close the applica
tion by clicking the Exit menu item. Identify 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 MDI parent form.
3. Convert the form to the MDI parent form.
4. Design the Student Details entry form.
5. Create the Print menu on the Student Details entry form.
6. Add code to MDI 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 MDI parent form.
3. Design the menu on the MDI parent form.
4. Add code to MDI 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 MDI parent form.
3. Design the menu on the MDI parent form.
4. Design the Student Details entry form.
5. Create the Print menu on the Student Details entry form.
6. Add code to MDI 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 MDI parent form.
3. Add code to MDI parent form and Student Details entry form.
4. Design the menu on the MDI 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."
3
148 You are working as an application developer in InfoSol Inc. You are aske
d 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 Prin
tDocument controls to invoke the default Print dialog box. Identify 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(object sender, System.Drawing.Prin
ting.PrintPageEventArgs e)
{
e.Graphics.DrawString(textBox1.Text, new Font(""Arial"",40, FontStyl
e.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(object sender, System.Drawing.Prin
ting.PrintPageEventArgs e)
{
e.Graphics.DrawString(textBox1.Text, new Font(""Arial"",40, FontStyl
e.Bold), Brushes.Black, 150, 125);
}"
"3, public partial class Form1 : Form
{
PrintDialog pdlg = new PrintDialog();
internal PrintDocument PDocument = new PrintDocument();
public Form1()
{
InitializeComponent();
}
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.P
rintPageEventArgs e)
{
e.Graphics.DrawString(textBox1.Text, new Font(""Arial"", 40,
FontStyle.Bold), Brushes.Black, 150, 125);
} }"
"4, public partial class Form1 : Form
{
PrintDialog pdlg = new PrintDialog();
internal PrintDocument PDocument = new PrintDocument();
public Form1()
{
InitializeComponent();
}
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.P
rintPageEventArgs e)
{
e.Graphics.DrawString(textBox1.Text, new Font(""Arial"", 40,
FontStyle.Bold), Brushes.Black, 150, 125);
} }"
1
149 You are working as an application developer in InfoSol Corp. You are ask
ed to create a Window-based application that should implement the concept of glo
balization. The application should have an interface to provide the information
about culture settings of the system on which the application is running. The in
formation should be available on the message box when the user clicks the button
. Identify the code that you need to add to the click event of the button contro
l.
"1, private void button1_Click(object sender, EventArgs e)
{
CultureInfo myCulture;
myCulture = CurrentCulture;
MessageBox.Show(""Your Culture Info is:""+"" ""+myCulture.ToString()
);
}"
"2, private void button1_Click(object sender, EventArgs e)
{
CultureInfo myCulture;
myCulture = CultureInfo.CurrentCulture();
MessageBox.Show(""Your Culture Info is:""+"" ""+myCulture.ToString()
);
}"
"3, private void button1_Click(object sender, EventArgs e)
{
CultureInfo myCulture = new CultureInfo();
myCulture = CultureInfo.CurrentCulture;
MessageBox.Show(""Your Culture Info is:""+"" ""+myCulture.ToString()
);
}"
"4, private void button1_Click(object sender, EventArgs e)
{
CultureInfo myCulture;
myCulture = CultureInfo.CurrentCulture;
MessageBox.Show(""Your Culture Info is:""+"" ""+myCulture.ToString()
);
}"
4
150 You are working as an application developer in Infosol Corp. You are ask
ed to create a Windows-based application that should have Pop-up help for displa
ying tips for the controls present in the application. Identify the correct step
s 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."
4
151 "Anthony is working as an application developer in Infosol corp. He is a
sked 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 de
fault Print dialog box by instantiating the PrintDialog class. He writes the fol
lowing 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()
{
InitializeComponent();
}
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.P
rintPageEventArgs e)
{
Graphics.DrawString(textBox1.Text, new Font(""Arial"", 40, FontStyle
.Bold), Brushes.Black, 150, 125);
} }}
The preceding code gives an error when compiled. Identify the line of code cause
s the error."
1, Graphics.DrawString(textBox1.Text, new Font("Arial", 40, FontStyle.Bold), Bru
shes.Black, 150, 125);
2, pdlg.Document = PDocument;
3, internal PrintDocument PDocument = new PrintDocument();
4, PrintDialog pdlg = new PrintDialog();
1
152 "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 sal
es 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 ru
nning in the organization. When the application was executed to generate the rep
ort, the records were not displayed in the tables present in the report. Identif
y 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 Mod
el method.
4, He used the Push Model method for generating reports.
3
153 "John is working as an application developer in InfoSol Inc. He is asked
to develop a Windows-based application that should show the date in different f
ormats 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. Identify the correct r
eason for error."
"1, The MyDateTime object is not declared correctly. It should be declared as:
DateTime MyDateTime = new DateTime();"
2, Error in the parameter passed to the ToString() method. It should not have an
y parameter passed to it.
3, Error in the parameter passed to the Parse() method. The parameter should hav
e used ToString() method to convert the date into string.
4, Wrong method called by the DateTime class. The ToString() method should have
been used.
3
154 Anthony is an application developer in InfoNet Inc. He is asked to creat
e a Windows-based application for BestRetails Inc. BestRetails Inc., is a leadin
g retail organization that has its business spread in four countries, France, Ja
pan, Spain, and US. He needs to create the common application that should automa
tically load the appropriate version of the interface according to the existing
culture settings on different systems in different countries. He creates the app
lication that runs perfectly. However, in Japan the application displays the def
ault interface of US. Identify 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 InfoGain Inc. He is asked update
an existing Windows-based application without recompiling it. To update the app
lication, 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. In Solution Explorer, right-click the project and choose Properties. The Prop
erty pages open.
3. In the Output Type drop-down menu, change the output type of the project to C
lass 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 th
e project. The resources you added to the project, are compiled into the assembl
y.
However, he is not able to accomplish the desired task. Identify 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 need
s 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 E
xisting Item from the Project menu.
4
156 You are creating an MDI application that supports more than one instance
s of a child form. You need to write a code snippet to get an instance of the ch
ild form that has the focus or that is most recently active. Identify the correc
t 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 foll
owing printing permission levels allows printing only from a more-restricted dia
log box?
1, SafePrinting 2, NoPrinting 3, DefaultPrinting 4, AllPrinting
1
158 You are creating a Windows-based application that is using the CrystalRe
portViewer control to display the groups into which the Crystal Reports is divid
ed. Which of the following components of the CrystalReportViewer control you wil
l 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 Resour
ceManager 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 (h
hw.exe) tool, which is a help-authoring tool. In which of the following files yo
u 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
161 You are working as a developer in InfoSol Inc. You are asked to create a
n application that allow the user to load the picture available on the machine o
n which the application is running. The application should allow the user to ent
er the path, where the picture is located, in the textbox. You need to use the a
synchronous method to create your application. Identify the correct code that yo
u need to add to your application.
"1, private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArg
s e)
{
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
}
else if (e.Cancelled)
{
MessageBox.Show(""Load cancelled"");
}
else
{
MessageBox.Show(""Load completed"");
}
}
private void btnLoadPicture_Click(object sender, EventArgs e)
{
pictureBox1.Load(textBox1.Text.ToString());
}
private void btnCancel_Click(object sender, EventArgs e)
{
pictureBox1.CancelAsync();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}"
"2, private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArg
s e)
{
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
}
else if (e.Cancelled)
{
MessageBox.Show(""Load cancelled"");
}
else
{
MessageBox.Show(""Load completed"");
}
}
private void btnLoadPicture_Click(object sender, EventArgs e)
{
pictureBox1.AddAsync(textBox1.Text.ToString());
}
private void btnCancel_Click(object sender, EventArgs e)
{
pictureBox1.CancelAsync();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}"
"3, private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArg
s e)
{
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
}
else if (e.Cancelled)
{
MessageBox.Show(""Load cancelled"");
}
else
{
MessageBox.Show(""Load completed"");
}
}
private void btnLoadPicture_Click(object sender, EventArgs e)
{
pictureBox1.LoadAsync();
}
private void btnCancel_Click(object sender, EventArgs e)
{
pictureBox1.CancelAsync();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}"
"4, private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArg
s e)
{
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
}
else if (e.Cancelled)
{
MessageBox.Show(""Load cancelled"");
}
else
{
MessageBox.Show(""Load completed"");
}
}
private void btnLoadPicture_Click(object sender, EventArgs e)
{
pictureBox1.LoadAsync(textBox1.Text.ToString());
}
private void btnCancel_Click(object sender, EventArgs e)
{
pictureBox1.CancelAsync();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}"
4
162 You are working as a developer in InfoSol Inc. You are asked to create a
Windows-based application that should implement the concept of asynchronous pro
gramming. For such application, the Event Handlers must be assigned to the DoWor
k 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(backgroundWorker1_DoWork)
;
this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(
);"
"2, backgroundWorker1.DoWork += new DoWorkEventHandler();
this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(
);"
"3, backgroundWorker1.DoWork = new DoWorkEventHandler(backgroundWorker1_DoWork);
this.backgroundWorker1.RunWorkerCompleted = new RunWorkerCompletedEventHandler(b
ackgroundWorker1_RunWorkerCompleted);"
"4, backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork)
;
this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(
backgroundWorker1_RunWorkerCompleted);"
4
163 "You are working as a developer in InfoSol 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 a
n application that should validate the customer's name and card number before al
lowing them to avail the discounts. The interface of your application must have
the validate button. Your application must have reference to the validation comp
onent created by your team.
Identify the code snippet that you need to add to the click event of the validat
e 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(""Invalid 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(""Invalid 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(""Invalid 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(""Invalid Card Number"");"
3
164 You are working as a developer in Infosol corp. You are asked to create
a Windows-based application for a university which is conducting an entrance exa
m. 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 val
idate the age. Identify 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 Infosol Corp. You are ask
ed to create an application whose interface must have a Calendar control. The To
olbox window of the Visual Studio IDE does not show the Calendar control. So you
decide to add the Calendar control to the Toolbox window by selecting it from t
he Choose Toolbox Items dialog box. After the Calendar control is added to the T
oolbox 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. Identify those assemblies.
1, AxInterop.MSACAL and MSACAL 2, stdole and System
3, MSACAL and stdole 4, AxInterop.MSACAL and stdole
1
166 Which of the following statements you need to write in your Windows appl
ication 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, In-process components 2, Out-of-process components
3, Public constructors 4, Internal constructors
1
168 ______________ can be used in a component if you want to use it only ins
ide the component class.
1, Copy constructors 2, Public constructors
3, Internal 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, limit
s the number of threads that can access a resource or pool of resources concurre
ntly?
1, Semaphore class 2, ThreadPool class
3, ReaderWriterLock class 4, Monitor class
1
171 You are asked to create an Out-of-process component that should enable t
he communication between an application and a database. Which of the following c
omponent types you will create?
1, Nonvisual component 2, Visual component
3, In-process component 4, AdRotator component
1
172 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 followi
ng types of the constructor you need to create?
1, Internal constructors 2, Public constructors
3, Private constructors 4, Protected constructors
2
173 You are asked to create a composite control for a Windows-based applicat
ion. Which of the following classes you need to use to inherit for creating the
composite control?
1, System.Windows.Forms.UserControl
2, System.Windows.Forms.Button
3, System.Windows.Forms.Control
4, System.Windows.Forms.TextBox
1
174 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. Whic
h 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, Semap
hore class
1
175 You are asked to create an application that should allow simultaneous ex
ecution of multiple tasks by using the various methods and events of the Backgr
oundWorker component. Which of the following methods you need to use to accompli
sh the desired task?
1, Worker() 2, CancelAsync() 3, RunWorkerAsync() 4, Dispose()
3
176 "Anthony is working as a developer in InfoSol 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 do
cument 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 associat
ed with the file type.
5. Select the Command property in the Properties window to associate the file ty
pe with an executable file. The Select Item 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 desi
red results. Do you agree?"
1, No. The steps given are correct.
2, Yes. The step 6 shouldbe performed before step 4.
3, Yes. Step 3 should be performed before step 2.
4, Step 4 should be performed before step 2.
1
177 "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 edito
r.
2. Select Action-->Add File Launch Condition.
3. Click the Search for File node, and press the F4 key to switch to the Propert
ies window.
4. Select the FileName property in the Properties window, and type the name of t
he 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 f
ile does not exist.
7. Press the F4 key to view the properties for the Condition node. In the Messag
e 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 yo
u 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.
1
178 "John is working as a developer in Infosol Corp. He is asked to modify t
he 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 th
e <codeBase> element. Do you agree?"
1, Yes. He should change the oldVersion attribute of the <bindingRedirect> eleme
nt.
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> el
ement.
4
179 "John is working as a developer in Infosol Inc. 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:
................
WindowsIdentity wId = WindowsIdentity.GetCurrent();
WindowsPrincipal = wPr.WindowsPrincipal(wId);
...............
He gets the compile time error. Help him by providing the correct code snippet."
"1, WindowsIdentity wId = new WindowsIdentity();
WindowsPrincipal wPr = new WindowsPrincipal(wId);"
"2, WindowsIdentity wId;WindowsPrincipal wPr = new WindowsPrincipal(wId);"
"3, WindowsIdentity wId =WindowsIdentity.GetCurrent();WindowsPrincipal wPr;"
"4, WindowsIdentity wId = WindowsIdentity.GetCurrent();
WindowsPrincipal wPr = new WindowsPrincipal(wId);"
4
180 You are working as a developer in InfoGain Inc. Your manager has asked y
ou to create a Windows-based application which should have the custom settings p
rovided by the configuration file. The application should be able to access at r
un time. You are asked to create two custom settings 'setting1' and 'setting2'.
Identify 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.SingleTagSectionHandler"
"/>
<mySection setting1=""a"" setting2=""b"" />
</configuration>
</configSections>"
"3, <configuration>
<section name=""mySection"" type=""System.Configuration.SingleTagSectionHandler"
"/>
<configSections>
</configSections>
<mySection setting1=""a"" setting2=""b"" />
</configuration>"
"4, <configuration>
<configSections>
<section name=""mySection"" type=""System.Configuration.SingleTagSectionHandler"
"/>
</configSections>
<mySection setting1=""a"" setting2=""b"" />
</configuration>"
4
181 You are working as a developer in Infogain 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 n
ewer version, which is 2.0.0.0, of the assembly. In addition, the garbage collec
tion 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 d
esired task. Identify 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>
<assemblyIdentity name=""myAssembly"" publicKeyToken=""32ab4ba45e0a69a1"" cultur
e=""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""/>
<assemblyIdentity name=""myAssembly"" publicKeyToken=""32ab4ba45e0a69a1"" cultur
e=""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"">
<assemblyIdentity name=""myAssembly"" publicKeyToken=""32ab4ba45e0a69a1"" cultur
e=""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>
<assemblyIdentity name=""myAssembly"" publicKeyToken=""32ab4ba45e0a69a1"" cultur
e=""neutral"" />
<bindingRedirect oldVersion=""1.0.0.0"" newVersion=""2.0.0.0""/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>"
4
182 You are working as a developer in Infogain Corp. You are asked to create
an application that should have implemented the Windows Installer launch condit
ion. Identify the correct steps that you need to perform to add a Windows Instal
ler launch condition.
"1, 1. Select the Requirements on Target Machine node in the Launch Conditions e
ditor.
2. Select Action-->Add Windows Installer Launch Condition.
3. Click the Search for Component node, and press the F4 key to switch to the Pr
operties window.
4. Select the ComponentID property, and type the ID of the component to be searc
hed 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 compon
ent does not exist on the target computer."
"2,
1. Select the Requirements on Target Machine node in the Launch Conditions edit
or.
2. Press the F4 key to open the Properties window.
3. Select Action-->Add Windows Installer Launch Condition.
4. Click the Search for Component node, and press the F4 key to switch to the Pr
operties window.
5. Select the ComponentID property, and type the ID of the component to be searc
hed 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 compon
ent does not exist on the target computer."
"3,
1. Select the Requirements on Target Machine node in the Launch Conditions edito
r.
2. Select Action-->Add Windows Installer Launch Condition.
3. Select the ComponentID property, and type the ID of the component to be searc
hed 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 Pr
operties window.
7. Type the error message in the Message property, to be displayed if the compon
ent does not exist on the target computer."
"4,
1. Select Action-->Add Windows Installer Launch Condition.
2. Select the Requirements on Target Machine node in the Launch Conditions edito
r.
3. Click the Search for Component node, and press the F4 key to switch to the Pr
operties window.
4. Select the ComponentID property, and type the ID of the component to be searc
hed 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 compon
ent does not exist on the target computer."
1
183 You are working as a developer in InfoSol Inc. You are asked to create a
deployment project that should include the File Types Editor to enable the user
s to add or remove files. Identify 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 do
cument 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 associat
ed with the file type.
5. Select the Command property in the Properties window to associate the file ty
pe with an executable file. The Select Item 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 d
ocument 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 associat
ed with the file type.
5. Select the Command property in the Properties window to associate the file ty
pe with an executable file. The Select Item 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 do
cument 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 associat
ed with the file type.
6. Select the Command property in the Properties window to associate the file ty
pe with an executable file. The Select Item 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 do
cument type in the name text box.
4. Select the Extensions property and specify the file extensions to be associat
ed with the file type.
5. Select the Command property in the Properties window to associate the file ty
pe with an executable file. The Select Item in Project dialog box opens.
6. Select the executable file to be associated with the file type."
1
184 You are working as a developer in Infosol Inc. You are part of the team
that is developing a deployment project for the application that is created by t
he team. You are asked to set the environment variable named PATH on each target
machine on which your application will execute. Identify the steps that you nee
d to perform to accomplish the desired task.
"1,
1. Select the HKEY_CURRENT_USER key in the Registry editor.
2. In the Action menu, select New-->String Value. Change the name of the newly c
reated value to PATH.
3. Select Action-->New Key. Change the name of the new key to ENVIRONMENT.
4. Select the ENVIRONMENT 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 ENVIRONMENT.
3. Select the ENVIRONMENT key.
4. In the Action menu, select New-->String Value. Change the name of the newly c
reated 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 ENVIRONMENT.
3. In the Action menu, select New-->String Value. Change the name of the newly c
reated value to PATH.
4. Select the ENVIRONMENT 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. In the Action menu, select New-->String Value. Change the name of the newly c
reated 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 ENVIRONMENT.
5. Select the ENVIRONMENT key."
2
185 Programs and libraries for .NET are packaged into units called ________.
1,Global Assembly Cache 2, Assemblies 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 r
egister the assembly to the GAC?
1, /L 2, /I 3, /u 4, /U
2
188 Using the Visual Studio .NET deployment tools, you can deploy the applic
ations that cannot be deployed by using the ______ command.
1, sn -k filename.snk 2, ILdasm <assembly name> 3, gacutil 4, XCOPY
4
189 Which of the following registry keys stores information about file exten
sions and their association with executable files?
1, HKEY_CLASSES_ROOT 2, HKEY_USERS
3, HKEY_CURRENT_USER 4, HKEY_LOCAL_MACHINE
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 configurati
on 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, IgnoreSectionHandler 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, LocalIntranet 4, Internet
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 Identity 4, Generic Identity
1
195 You are asked to create an assembly by using the Visual Studio .NET IDE
for VC#. Identify 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. Identi
fy 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 ne
ed to use to accomplish the desired task?
1, Registry Editor 2, File System Editor
3, User Interface 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. In which of th
e 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. Whi
ch of the following methods you need to use to accomplish the desired task?
1, ConfigurationSettings.AppSettings() 2, Configuration.AppSettings()
3, Configuration.GetConfig() 4, ConfigurationSettings.GetConfig()
4
200 "John is working as an application developer in Infosol Inc. He is creat
ing a deployment project. He is asked to add a sub folder to the deployment proj
ect 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 t
he 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"