Summative
Summative
Summative
ion
Question Text Type Choice1 Choice2 Choice3 Choice4 Choice5
MCQ 1&2&3 1&3&4 1&2&4 2&4&3
SQL Server 2008 Security model is based on three categories that separate
the basic elements of security, which among the following are those?
1 1.Principals
2.Constraints
3.Securables
4.Permissions
MCQ 1&2&3 2&3&4 3&4&5 1&2&3&4 2&3&4&5
Which statements are true about Principals?
1.Principals are en es that can configure SQL Server permissions
2.Principals are en es that can request SQL Server resources
2
3.Principals can be arranged in a hierarchy
4.The scope of influence of a principal depends on the scope of the
defini on of the principal
5.The scope of influence of a principal depends on the size of the database
MCQ 1&4 2&3&4 1&3 1&3&4
Choose the different classes which the SQL Server divides principals into?
1.Windows-level principal
3
2.Field-level principal
3.Database-level principal
4.SQL Server-level principal
Which are the different types of Windows-level principals? MCQ 2&4 2&3 1&2&4 only 2
1.Windows Authoriza on
4 2.Windows domain login
3.Windows database login
4.Windows local login
How are Database-level principals categorized? MCQ 1&4&5 2&3&5 1&2&3&5 2&5 1&2&5
1.Database administrator
2.Database User
5
3.Database Role
4.Windows Role
5.Application Role
Which among the following are different Securable scopes? MCQ 1&3&4 2&4 1&2&4 3&4
1.Server
6 2.Client
3.Database
4.Schema
Which of the securables are contained in the Database scope? MCQ 1&2&3 3&4&5 1&3&5 2&3&4 1&2&5
1.Login
2.User
7
3.Role
4.Assembly
5.End Point
MCQ 2&4&5 1&3&4 1&2&5 2&3&5 1&2&4
What are the advantages of using SQL Server Authen ca on?
1.Allows SQL Server to support Web-based applications where users
create their own iden es
2.Allows software developers to distribute their applications by using a
8
complex permission hierarchy based on known, preset SQL Server logins
3.Can also use Kerberos Security protocol
4.Users can connect from unknown or untrusted domains
5.Additional password policies offered by Windows can be inherited for
SQL Server logins
Which all permission types are applicable to Func ons? MCQ 3&5 2&4 1&5 1&2&5 3&4
1.SELECT
2.INSERT
9
3.UPDATE
4.DELETE
5.EXECUTE (scalar)
Which are the principals included in the Security context? MCQ 2&4 1&4&5 1&4 1&2&4 1&3&4&5
1.The login
2.The user
10
3.Authen ca on memberships
4.Role memberships
5.Role aggregation
What will be the output of the following query? MCQ 2&3 1&4 2&5 4&5 3&5
USE SalesSystem;
GO
SELECT PATINDEX('%ia',Country)
FROM Produc on.Customer
GO
1.The query returns those rows in the table in which the pa ern was found
2.The query returns all the columns for those rows in the table in which
11
the pa ern was found
3.The query returns only those columns in each row in the table in which
the pa ern was found
4.The query returns all rows in the table and reports nonzero values for
those rows in which the pa ern was found
5.The query returns all rows in the table and reports zero values for all
rows in which the pattern was not found
On what conditions can you perform concurrent online index operations MCQ 2&3&5 1&3&5 1&2&4 3&4&5 2&4
on the same table?
1.Crea ng mul ple clustered indexes
2.Crea ng mul ple nonclustered indexes
12
3.Reorganizing different indexes on the same table
4.Reorganizing unique indexes on mul ple tables
5.Reorganizing different indexes while rebuilding nonoverlapping indexes
on the same table
Which statements are true w.r.t. Indexing about Large Object data types? MCQ 1&2&5 2&4&5 2&4 1&4&5 3&4&5
1.Can be an index key column only if a primary key is men oned
2.Cannot be an index key column
3.Can participate as nonkey columns in a clustered index except for image,
13 ntext, and text
4.Can participate as nonkey columns in a nonclustered index except for
image, ntext, and text
5.Can participate if part of a computed column expression
Can you convert a Nonpartitioned Table to a Partitioned Table? If yes, MCQ only 1 1&2 2&4&5 2&3 3&5
how?
1.By creating a partitioned non-clustered index on the table by using the
CREATE INDEX statement
2.By creating a partitioned clustered index on the table by using the
CREATE INDEX statement
14
3.By using the ALTER TABLE SWITCH statement to switch the data of the
table to a range-par oned table that has only one par on
4.By using the ALTER TABLE SWITCH statement to switch the data of the
table to a range-indexed table that has a unique par on
5.You cannot convert a Nonpartitioned Table to a Partitioned Table
Where all can Aggregate func ons be used as Expressions? MCQ 2&4&5 1&2&4 1&3&5 2&3&5 1&2&4&5
1.The select list of a SELECT statement (either a subquery or an outer
query)
15 2.A COMPUTE or COMPUTE BY clause
3.A GROUP BY clause
4.A HAVING clause
5.An OVER clause
Which statements are true about VARP func on? MCQ 3&5 1&4 2&5 4&5 2&4
1.Returns the sta s cal variance of all values in the specified expression
2.Returns the statistical variance for the population of all values in the
specified expression
16
3.VARP can be used with Var columns only
4.VARP can be used with numeric columns only
5.Null values are treated as zeros or blanks depending on the type
Which statements are true about the GROUPING func on? MCQ 1&3&4 1&2&4 1&3&5 3&4 3&5
1.It is an aggregate function that causes an additional column to be output
with a value of 1 when the row is added by either the CUBE or ROLLUP
operator
2.It is an aggregate function that causes an additional column to be output
with a value of 0 (True) when the row is added by either the CUBE or
ROLLUP operator
3.It is an aggregate function that causes an additional column to be output
17
with a value of 0 when the row is not the result of CUBE or ROLLUP
operator
4.It is an aggregate function that causes an additional column to be output
with value equal to the number of rows added by either the CUBE or
ROLLUP operator
5.Grouping is allowed only in the select list associated with a GROUP BY
clause that contains either the CUBE or ROLLUP operator
What does the following code denote? MCQ 1&2&4 1&3&5 4&5 2&3&5 3&4&5
DECLARE @odetails orderdetails;
SELECT @odetails = orderdetails::GetFirstItem();
PRINT @odetails.ToString();
1.It denotes usage of Scope Resolu on operator
2.It denotes usage of Compound operator
18
3.The operator is denoted by a :: symbol
4.The operator provides access to public non-static members of a
compound data type
5.The operator provides access to static members of a compound data
type
4.
Which statements are true about ROLLBACK TRANSACTION statement? MCQ 1&2&4 2&3&4 3&4&5 1&3&5 2&4&5
1.Rolls back an implicit transaction to the beginning of the transaction, or
to a savepoint inside the transac on
2.Rolls back an explicit transaction to the beginning of the transaction, or
to a savepoint inside the transac on
3.It caches all data modifications & then erases from the start of the
19
transac on or to a savepoint
4.It erases all data modifications made from the start of the transaction or
to a savepoint
5.It reverses all the modifications made before the COMMIT TRANSACTION
statement
Which all statements are true about varchar data type? MCQ 2&4 1&2 1&3&4 1&3
1.varchar can hold alphanumeric data
2.The storage size of Varchar datatype is fixed
20 3.Each row can hold different number of characters up to the max length
defined
4.Each row can hold fixed number of characters as defined by max length
Which statements are true about the max constant in a varchar type? MCQ 1&2 2&3 1&3 1&3&4
1.It can be used when the data can exceed more than 8000 characters
2.It can be used to fix the max length of characters for the en re column
21 3.It can be used to store large blocks of text
4.It can be used to store large image types
Which all statements are true about varbinary data type? MCQ 1&3 2&3 2&4 1&2&4
1.varbinary can hold binary data
22 2.varbinary can hold character data
3.The stored data can exceed 8,000 bytes
4.The value is based on regular expression logic
Which statements are true for a scenario where a data type is converted to MCQ 3&4&5 1&3&4&5 2&4&5 1&2&5 1&3&5
varbinary?
1.When data is converted from a string data type to a binary or varbinary
data type of unequal length, SQL Server pads or truncates the data on the
right
2.When data is converted from a string data type to a binary or varbinary
23 data type of unequal length, SQL Server pads or truncates the data on the
le
3.When data types, except string, are converted to binary or varbinary, the
data is padded or truncated on the le
4.When data types, except string, are converted to binary or varbinary, the
data is padded or truncated on the right
5.Padding is achieved by using hexadecimal zeros
Which statements are true about sysname? MCQ 2&4&5 1&3&5 1&3&4 1&2&5 3&4&5
1.sysname is a system-supplied user-defined data type that is functionally
equivalent to nvarchar(128)
2.sysname is a system-supplied user-defined data type that is functionally
24
equivalent to nvarchar(256)
3.Sysname is not nullable
4.Sysname can hold Null & nega ve values
5.sysname is used to reference database object names
Which statements are true about Large CLR User defined types? MCQ 1&3 2&4 1&4 1&2
1.Extend exis ng SQL Server type system
25 2.Same as User-defined data type
3.Allow you to store CLR objects in SQL Server database
4.Allow you to store binary data in SQL Server database
How do aggregate func ons work? MCQ 1&2&3 2&3&4&5 1&2&5 3&4&5 2&3&4
1.They work only on integer values
2.They ignore null values
3.They perform a calculation on a set of values and return a
26 single/summarized value
4.They are frequently used with the GROUP BY clause of the SELECT
statement
5.They cannot be used with the GROUP BY clause of the SELECT statement
How does the ROWCOUNT_BIG function work, identify all the applicable MCQ 1&2&3 2&3 1&3&4 3&4
statements?
1.Returns the total number of rows in a table
27 2.Returns the number of rows affected by the last statement executed
3.The return type of ROWCOUNT_BIG is bigint
4.The return type of ROWCOUNT_BIG is int
Which statements are true about ranking func ons? MCQ 2&3 1&4 1&2&3 only 4
1.They are determinis c func ons
28 2.They are Nondeterminis c func ons
3.They return a ranking value for each row in a par on
4.They return a ranking value for each table in a partition
Which statements are true about DENSE_RANK func on? MCQ 2&4 1&3 1&2 3&4
1.Returns the rank of rows within the partition of a result set, without any
gaps in the ranking
2.The rank of a row is one plus the number of distinct ranks that come
29
before the row in ques on
3.Returns the rank of each row within the par on of a result set
4.The rank of a row is one plus the number of ranks that come before the
row in question
Which statements are true about RANK func on? MCQ 4&5 2&3&5 1&3 3&5 2&4
1.It returns the rank of each row in the table within the partition of a
database
2.The rank of a row is equal to the number of ranks that come before the
30 row in ques on
3.The rank of a row is one plus the number of ranks that come before the
row in ques on
4.The RANK func on returns consecu ve integers
5.The RANK function does not always return consecutive integers
Which statements are applicable to the GROUPING func on? MCQ 3&4 1&2&5 1&4&5 2&3 1&3&4
1.It is an aggregate function that causes an additional column to be output
with a value of 1 when the row is added by either the CUBE or ROLLUP
operator
2.It is an aggregate function that causes an additional column to be output
with a value of 1 when the row is not the result of CUBE or ROLLUP
operator
31 3.It is an aggregate function that causes an additional column to be output
with a value of 0 when the row is added by either the CUBE or ROLLUP
operator
4.It is an aggregate function that causes an additional column to be output
with a value of 0 when the row is not the result of CUBE or ROLLUP
operator
5.Grouping is allowed only in the select list associated with a WHERE
clause that contains either the CUBE or ROLLUP operator
Which are the different types of built-in functions that SQL Server 2008 MCQ 1&2&3&4 2&3&4&5 3&4 1&3&5 2&4&5
supports?
1.Recordset func ons
32 2.Rowset func ons
3.Aggregate func ons
4.Ranking func ons
5.Scalar functions
Iden fy Determinis c func ons from the list: MCQ 1&3&5 2&3&4 1&3&4 2&3&5 1&2&3
1.ABS
2.GETDATE
33
3.DATEADD
4.CURRENT_TIMESTAMP
5.ISNULL
Where all can aggregate func ons be used as expressions only? MCQ 3&4 3&5 1&3&5 1&2 1&2&4
1.The select list of a SELECT statement
2.A COMPUTE or COMPUTE BY clause
34
3.A USING clause
4.A HAVING clause
5.A ORDER BY clause
MCQ 3&4 1&2 2&4 1&2&3
Which all are the options of ON DELETE clause of a FOREIGN KEY MCQ 1&2&3&4 1&3&5 2&3&4&5 2&3&4 1&2&4
constraint?
1.CLOSE
46 2.NO ACTION
3.CASCADE
4.SET NULL
5.SET DEFAULT
What all expressions are used to create a computed column? MCQ 2&3&4 1&4 2&3 1&2&3
1.subquery
47 2.non computed column name
3.Constant
4.Function
MCQ 3&5 1&4 2&3 1&4&5 2&3&5
What all tasks can Scalar queries be used for? MCQ 2&4&5 1&3&5 1&3&4 1&2&4 2&5
1.To establish an implicit inner join
2.To remove an outer join
53
3.To create computed columns from mul ple tables
4.To aggregate from mul ple tables
5.To insert into tables based on values from other tables
Which are the basic types of a sub query? MCQ 2&3&5 1&4&5 1&3&5 3&4 1&5
1.Those that operate on lists introduced with IN
2.Those that a comparison operator modified by ALL or NOT
3.Those that are introduced with an unmodified relational operator and
54
must return a computed value
4.Those that are introduced with an unmodified comparison operator and
must return a single value
5.Those that are existence tests introduced with EXISTS
What is the difference between corelated sub query & nested query? MCQ 3&5 1&4&5 2&4 1&2&4 1&2
1.In nested query the inner query is evaluated only once and from that
result outer query is evaluated
2.In co-related sub query the inner query is evaluated only once and from
that result outer query is evaluated
55 3.In co-related sub query the inner query is evaluated for multiple times
for ge ng one row of that outer query
4.In nested query the inner query is evaluated for multiple times for
ge ng one row of that outer query
5.Nested query contains a reference to the inner query row
How does a subquery with EXISTS work? MCQ 1&2&4 2&3&4 1&3 2&4
1.The subquery func ons as an existence test
2.The WHERE clause of the outer query tests whether data exists in the
56
subquery for each row of the outer query
3.The subquery returns a list of rows that match the criteria
4.The subquery returns a value of TRUE or FALSE
Which statements are true about CROSS APPLY operator? MCQ 3&4 2&3 1&2&4 1&3
1.CROSS APPLY operator is a mechanism to allow a developer to correlate
a table valued func on to another table
2.CROSS APPLY operator is a mechanism to allow a developer to correlate
a table valued func on to a stored procedure of another database
57 3.CROSS APPLY returns only rows from the outer table that produce a
result set from the table-valued func on
4.CROSS APPLY returns both rows that produce a result set, and rows that
do not, with NULL values in the columns produced by the table-valued
function
How are Null values handled in Joins? MCQ 1&3 2&4&5 3&5 1&3&4 2&3
1.When there are null values in the columns of the tables being joined, null
value of the right table is matched with the null value of the le table
2.When there are null values in the columns of the tables being joined, the
null values do not match each other
3.The presence of null values in a column from one of the tables being
58
joined can be returned only by using an inner join
4.The presence of null values in a column from one of the tables being
joined can be returned only by using an outer join
5.When null values are present in data being joined, it is usually preferable
to omit them from the results by using a regular join
Iden fy the difference between Inner Joins & Outer Joins MCQ 1&3&4 2&4 2&3 3&4
1.Inner joins can be specified in the FROM clause only
59 2.Inner joins can be specified in either the FROM or WHERE clauses
3.Outer joins can be specified in the FROM clause only
4.Outer joins can be specified in either the FROM or WHERE clauses
Which statements are true about data types ntext, text or image with MCQ 2&3 1&4 1&2&4 1&3
respect to Joins?
1.Tables can be joined directly on ntext, text, or image columns by using
the explicit assignment operator
60 2.Tables cannot be joined directly on ntext, text, or image columns
3.Tables can be joined on ntext, text, or image columns by using
SUBSTRING Func on
4.Tables can be joined on ntext, text, or image columns by using STR
Function
Iden fy the statements that are applicable to Three table joins MCQ 1&2&4 1&3 2&4 3&4
1.First two tables have to be used to bridge to the third table
2.Only one table can be used to bridge from one of the other tables to the
third table
61
3.At least one column from the middle table have to be referenced in the
select list
4.None of the columns from the middle table have to be referenced in the
select list
Which statements are true about Self Join? MCQ 3&4 3&5 1&2&4 1&2&5 2&3&5
1.Self-join should be used when you want to create a result set that joins
records from two tables
2.Self-join should be used when you want to create a result set that joins
records in a table with other records in the same table
3.To list a table two times in the same query, you must provide a table
62 alias for at least one of instance of the table name
4.The table alias helps the query processor determine which rows should
be displayed from the right table & which from the le version of the table
5.The table alias helps the query processor determine whether columns
should present data from the right or left version of the table
Which statements are true about APPLY operator? MCQ 1&4 1&3 2&3 2&4
1.The APPLY operator allows you to join two table expressions
2.The APPLY operator allows you to join two columns from the same table
3.The right table expression is processed every time for each row from the
63
le table expression
4.The left table expression is processed every time for each row from the
right table expression
Which statements are true about Join condi ons? MCQ 2&4 1&3&5 3&4&5 3&4 1&5
1.Joins can be specified only in the FROM clause
2.Joins can be specified only in the WHERE clause
3.Joins can be specified in either the FROM or WHERE clauses
4.Specifying the join conditions in the FROM clause helps separate them
from any other search condi ons that may be specified in a WHERE clause
64
& is the recommended method for specifying joins
5.Specifying the join conditions in the WHERE clause helps separate them
from any other search condi ons that may be specified in a FROM clause
& is the recommended method for specifying joins
What is your observa on on the following code? MCQ 1&3 2&4 3&4 1&2&3
USE Inventory;
GO
SELECT p.Name, pr.ProductReviewID
FROM Produc on.Product p
WHERE LEFT OUTER JOIN Produc on.ProductReview pr
ON p.ProductID = pr.ProductID
65
1.In the following code a FULL JOIN in the form of LEFT OUTER JOIN is used
in the WHERE clause
2.In the following code LEFT OUTER JOIN is used in the WHERE clause
3.There will be an error as an INNER JOIN will be required in the FROM
clause
4.There will be an error as LEFT OUTER JOIN cannot be used in a WHERE
clause
Which statements are true about check constraint? MCQ 1&3 2&4 3&4 1&2
1.A Check constraint Is used to limit the value that can be placed in a
column
66 2.A Check constraint Is used to de-limit the value that can be placed in a
column
3.Check constraint used to enforce the domain integrity
4.Check constraint used to enforce the entity integrity
Which statements are true about Not Null constraint? MCQ 3&4 1&3 2&4 1&2
1.A not null constraint enforces that the column will accept the null values.
2.A not null constraint enforces that the column will not accept the null
67 values.
3.Not Null constraint used to enforce the referen al integrity
4.Not Null constraint used to enforce the domain integrity
Which statements are true in difference between primary key and MCQ 2&3 1&2 1&2&4 1&4
unique key?
1.Primary Key is also a unique key internally, but it cannot allow
null
2.Primary Key is also a unique key internally, but it can allow null
68
3.Unique key on the other hand allow a single null and a multiple null
in a column
4.Unique key on the other hand allow a single null but not multiple
null over the column
Which statements are true full outer joins? MCQ 3&4 2&4 1&3 1&2
1.The FULL JOIN keyword returns all the rows from the left table,
and all the rows from the right table .
2.There are rows that do have matches, those rows will be listed as
69 well.
3.There are rows that do not have matches, those rows will be listed
as well.
4.The FULL JOIN keyword not returns the rows from the left table,
and all the rows from the right table .
Which statements are true right joins? MCQ 2&3 1&3 2&3&4 1&4
1.The RIGHT JOIN keyword returns all rows from the Right table , even if
there are no matches in the Le table .
70 2.The RIGHT JOIN keyword returns all rows from the Right table , even if
there are matches in the Left table .
3.It is the opposite of Left Outer join.
4.It is the opposite of full Outer join.
Which statements are true about default constraint? MCQ 1&2 2&3 3&4 1&4
1.A Default definition is used to add the values into the columns when
values are omi ed.
2.The default values must be compatible with the data type of the column
71 to which the default applies.
3.The default values must be non compatible with the data type of the
column to which the default applies.
4.A Default definition is used to add the values into the columns when
values are not omitted.
MCQ The INNER JOIN The INNER JOIN The INNER JOIN The INNER JOIN
keyword return rows keyword return all keyword return null. keyword return
when there is at least rows. rows when there
72 one match in both is at least non
tables. match in both
tables.
Which statements are true about inner joins?
MCQ SELECT * FROM SELECT (list of SELECT (list of SELECT * FROM
table_name WHERE columns ) FROM columns ) FROM table_name
(search-condition) table_name WHERE table_name WHERE WHERE (search-
GROUP BY (group by (search-condition) (search-condition) condition) GROUP
expression) HAVING(condition) HAVING(condition) BY (group by
73
HAVING(condition) GROUP BY (group by ORDER BY expression)
ORDER BY (ASC/DESC) expression) ORDER (ASC/DESC) GROUP ORDER BY
BY (ASC/DESC) BY (group by (ASC/DESC)
expression) HAVING(condition
Which one is the correct query regarding SQL –select Statements? )
MCQ Sort query result by Specifies a search Calculate the Creates a new
one or more columns condition for the summary value for table and inserts
74 group by column each group the resulting rows
from the query
INTO statement in the SELECT CLAUSE will _____________. into it
MCQ 1&2 1&2&4 3&4 1&3&4
Which is/are the statement/statements true about the TOP Clause?
1. The TOP expression can be applied in select ,insert ,update and delete
statements
75
2.The WHERE clause of the outer query tests whether data exists in the
subquery for each row of the outer query
3.The subquery returns a list of rows that match the criteria
4.The subquery returns a value of TRUE or FALSE
MCQ 1&4 1&2 2&3&4 only 1
Which statements are true about CROSS APPLY operator?
1.CROSS APPLY operator is a mechanism to allow a developer to correlate
a table valued func on to another table
76
2. The set of rows can be either a number or percentage and decimal value
3.Specifies that only the last set of rows will be returned from query
result
4.TOP clause cannot be apply with the variable
MCQ 3&5 1&2&4 1&3 2&5 2&4&5
How are Null values handled in Joins sql server 2008?
1.When there are null values in the columns of the tables being joined, null
value of the right table is matched with the null value of the le table
2.When there are null values in the columns of the tables being joined, the
null values do not match each other
77
3.The presence of null values in a column from one of the tables being
joined can be returned only by using an inner join
4.The presence of null values in a column from one of the tables being
joined can be returned only by using an outer join
5.When null values are present in data being joined, it is usually preferable
to omit them from the results by using a regular join
MCQ 2&4 1&3 3&4 2&3
Iden fy the difference between Inner Joins & Outer Joins.
1.Inner joins can be specified in the FROM clause only
78
2.Inner joins can be specified in either the FROM or WHERE clauses
3.Outer joins can be specified in the FROM clause only
4.Outer joins can be specified in the group by clause only
Which statements are true about data types ntext, text or image with MCQ 2&3 1&4 3&4 1&2
respect to Joins?
1.Tables cannot be joined directly on ntext, text, or image columns by
using the implicit assignment operator
79 2.Tables cannot be joined directly on ntext, text, or image columns
3.Tables can be joined on ntext, text, or image columns by using
SUBSTRING Func on
4.Tables can be joined on ntext, text, or image columns by using STR
Function
MCQ 2&3&4 1&2&3&4 2&4 1&3&5 1&2&3&5
Which are the conditions that should be in place before you apply a
different colla on to a database?
1.You are the only one currently using the database
87
2.The database is DETACHED so that it cannot be used by anyone
3.No schema-bound object depends on the colla on of the database
4.Object-level integrity does not depend on the colla on of the database
5.Changing the database collation does not create duplicates among any
system names for the database objects
Which namespaces may cause the failure of a database collation change if MCQ 2&3&5 1&2&3 4&5 3&4 2&3&4
duplicate names result from the changed colla on?
1.Referen al integrity constraints
88 2.Schema names
3.Scalar-type names such as system and user-defined types
4.Index names across mul ple tables
5.Full-text catalog names
Which are the different methods that can be used to retrieve individual MCQ 1&3 2&3 1&2&4 3&4
database op ons?
1.By using DATABASEPROPERTY Func on
89
2.By using DATABASEPROPERTYEX Func on
3.By using sp_dbop on system stored procedure
4.By using sp_database system stored procedure
MCQ 3&4 2&3&4 1&4 1&3
For which all condi ons will you go for par oning a table?
90 1.Table contains large amounts of data that are used in different ways
2.Database contains large amount of tables
3.Queries or updates are not performing as intended due to large data
4.If the tables has many columns
How is the data of Par on tables managed? MCQ 3&4&5 1&5 1&2&4 2&3 4&5
1.The data of partitioned tables and indexes is divided into units that can
be spread across more than one filegroup in a database
2.The data is partitioned horizontally, so that groups of rows are mapped
into individual par ons
91 3.The data is partitioned vertically, so that groups of rows are mapped into
individual par ons
4.The table or index is treated as a single logical entity when queries or
updates are performed on the data
5.The table or index is treated as multiple logical entities when queries or
updates are performed on the data
How is replica on affected by par oning of tables & indexes? MCQ 1&3&4 2&4&5 1&2 3&4 2&3&5
1.Par oning cannot be applied in case of transac onal replica on
2.The performance of transactional replication can be optimized through
partitioning by effectively reducing the amount of data and metadata that
has to be managed by the replica on system
92 3.The performance of merge replication can be optimized through
partitioning by effectively reducing the amount of data and metadata that
has to be managed by the replica on system
4.Par oning cannot be applied in case of merge replica on
5.Replication supports a maximum of 1024 partitions per table
What are the steps for crea ng par on tables & indexes? MCQ 1&3&5 2&3&4 1&2&5 2&3&4 2&3
1.Create a partition function to specify how a table or index that uses the
func on can be par oned
2.Create a partition function to specify the placement of the partitions of a
par on func on on filegroups
93
3.Create a partition scheme to specify the placement of the partitions of a
par on func on on filegroups
4.Create a partition scheme to specify how a table or index that uses the
func on can be par oned
5.Create a table or index using the partition scheme
How does par on func on work? MCQ 4&5 1&3&5 1&2&3 2&5 1&2&3
1.A par on func on specifies how the table or index is par oned
2.The func on maps the database into a set of par ons
3.The func on maps the domain into a set of par ons
4.To create a partition function, you must specify the number of partitions,
94 the par oning rows & the number of constraints for each par on
5.To create a partition function, you must specify the number of partitions,
the partitioning column & the range of partition column values for each
partition
Which all statements are true about Par on scheme? MCQ 1&3 2&4 1&2&3 2&3
1.A par on scheme specifies how the table or index is par oned
2.A partition scheme maps the partitions produced by a partition function
to a set of filegroups that you define
3.When you create a partition scheme, you define the filegroups where
95 the table partitions are mapped, based on the parameters of the partition
func on
4.When you create a partition scheme, you define the databases where
the table partitions are mapped, based on the parameters of the partition
function
Which all statements are true about par oning? MCQ 4&5 1&3&4 2&3 1&2 1&2&4
1.Partitioning enables you to manage and access subsets of data from
large tables quickly and efficiently
2.The integrity of a data collec on is maintained
3.The integrity of a data collection is not automatically maintained but will
96
have to be handled manually
4.Maintenance operations target only the data that is required, instead of
the whole table hence are more efficient
5.Maintenance operations target the whole database instead of individual
tables hence are more efficient
Which all statements are applicable to System catalogs? MCQ 1&3 1&2&3 3&4 2&4
1.Provide a set of views that show metadata that describes the objects in
an instance of SQL Server
2.Provide a set of stored procedures that show metadata that describes
the objects in an instance of SQL Server
97
3.Provide a mechanism for dynamic applications to determine the
strucutre & a ributes of the objects in any database that they connect
4.Provide a mechanism for dynamic applications to analyze data contained
in a particular table of a database
How can SQL Server based applications access the information in system MCQ 1&2&4 3&5 2&3&4 1&3&4&5 1&2&4&5
catalogs?
1.Using Catalog views
98 2.Using Database views
3.Using Informa on schema views
4.Using OLE DB schema rowsets
5.System stored procedures & functions
Why are catalog views the preferred choice for accessing the information MCQ 1&2&3&4 1&2&4&5 2&4 1&3&5 3&4&5
in system catalogs?
1.They provide access to all the metadata
2.The metadata information is presented in a format that is independent
of any catalog table implementa on
3.The metadata information is presented in a format that is dependent on
99
system tables, hence is in a fixed format which is easy to understand
4.They provide the most direct way to obtain, transform & present
customized forms of the catalog metadata
5.Catalog view names as well as the names of their columns are
descriptive
What are your observa ons on the following query? MCQ 1&4 2&3&4 2&3 1&3&4
SELECT name AS object_name
,SCHEMA_NAME(schema_id) AS schema_name
,type_desc
,create_date
,modify_date
FROM sys.objects
100 WHERE modify_date > GETDATE() - 10
ORDER BY modify_date;
1.It uses the sys.all_objects catalog view
2.It uses the sys.objects catalog view
3.It returns all database objects that have been modified in the last 10 days
4.It returns all database objects that have been newly added in the last 10
days
Which statements are true about cursors? MCQ 1&4 3&4 1&2&3 2&4
1.Opening a cursor on a result set allows processing the result set one row
at a me
2.Opening a cursor on a result set allows processing the complete result
101
set
3.You cannot assign a cursor to a variable or parameter
4.You can assign a cursor to a variable or parameter with a cursor data
type
MCQ 1&2 2&3&4 3&4 1&3&4
How do cursors extend result processing?
1.By allowing posi oning at specific rows of the result set
2.By allowing modifica on to the database structure to improve efficiency
102
3.By retrieving one row or block of rows from the current position in the
result set
4.By supporting data modifications to the rows at the current position in
the result set
MCQ 2&3&4 1&4 1&3 3&4
Which are the two ways of reques ng a cursor?
1.Transact-SQL
103
2.Events handling
3.Database applica on programming interface (API) cursor func ons
4.Windows programming interface (API) cursor functions
MCQ 1&4&5 1&3&4 3&5 2&4&5 2&3&4
SQL Server supports cursor func onality for which Database APIs?
1.DAO
104 2.ADO
3.OLE DB
4.ODBC
5.RDO
On what parameters will you choose a cursor type? MCQ 2&4 2&3&4 1&3&5 1&3&4&5 4&5
1.Size of the result set
2.Size of the Database
105
3.Percentage of data needed
4.Need for cursor opera ons
5.Level of visibility to data modified by other users
MCQ 1&2&3 1&2&3&4 4&5 2&3&5 1&3&4
What are the implica ons of the CLOSE statement on a cursor?
1.Closes an open cursor
106 2.Releases current resultset
3.Releases cursor locks held on the rows on which the cursor is posi oned
4.Releases the database connec ons
5.Drops dynamic recordsets
MCQ 3&4 1&2&3 1&4 2&4
How will you optimize the performance of the cursor if there are multiple MCQ 2&3&4 1&3&4 1&2 3&4
rows & columns to be fetched?
1.Use all columns in the Declare statement
112 2.Use only the required columns in the Declare statement
3.Change your where clause in the declare statement to only return rows
the cursor needs
4.Ensure you have optimal indexes in place
Iden fy disadvantages of using cursors. MCQ 1&2&3&5 2&3&4 2&4&5 1&2&4&5 3&5
1.They consume more resources
2.Performance gets hampered due to network round-trips if multiple rows
have to be fetched
3.Performance gets hampered if only the required rows & columns are
113
fetched
4.Performance gets hampered if all the rows & columns are fetched
5.Resources remain unused on the server if cursors are not closed properly
What does the LOCAL argument in the DECLARE CURSOR statement MCQ 1&3&4 2&3 1&3 1&2
denote?
1.Specifies that cursor can be available only in the batch, stored
procedure, or trigger in which the cursor was created
114 2.Specifies that cursor can be available to all local resources
3.The LOCAL cursor will be implicitly deallocated when the batch, stored
procedure, or trigger terminates
4.The LOCAL cursor will have to be explicitly deallocated when the batch,
stored procedure, or trigger terminates
How do FORWARD_ONLY cursors work? MCQ 2&3 1&4 1&3&4 2&3&4
1.Data is fetched in bulk
115 2.Data is fetched sequen ally from the first to the last row
3.FETCH NEXT is the only fetch op on supported
4.FETCH PREVIOUS is the only fetch option supported
What all is included in crea on of Control flow? MCQ 2&4 1&2&3 3&4&5 1&4 1&3&5
1.Adding containers that implement repeating workflows in a package or
divide a control flow into subsets
2.Adding containers that implement condi onal statements
3.Adding tasks that support data flow, prepare data, perform workflow
116 and business intelligence func ons, and implement script
4.Separating containers and tasks into an ordered control flow by using
precedence constraints
5.Connecting containers and tasks into an ordered control flow by using
precedence constraints
Integration Services includes three types of containers that you can use in MCQ 1&2&5 2&3&4 3&4 4&5 1&2&3&4
a control flow, which are they?
1.The DoWhile Loop container
117 2.The Foreach Loop container
3.The For Loop container
4.The Sequence container
5.The Switch container
What is the significance of precedence constraints? MCQ 1&2&3 1&2&3&4 1&3&4 2&4
1.Precedence constraints link executables, containers, and tasks in
packages into a control flow
2.A precedence constraint links two executables: the precedence
118 executable and the constrained executable
3.The precedence executable runs before the constrained executable
4.The precedence executable runs after the constrained executable
Which statements are true about the expression used in precedence MCQ 1&3&4 1&2&5 2&3&5 2&4 1&4&5
constraints?
1.The expression must evaluate to an integer
2.The expression must evaluate to true or false
119
3.The expression can use literals, system & custom variables
4.The expression can use stored procedures
5.The expression can use functions & operators that SSIS grammar
provides
What is the significance of Sequence Containers? Please choose all the MCQ 1&2&3 2&4 1&3 3&4
relevant op ons
1.They define a repea ng control flow in a package
2.They define condi ons in a package
120 3.They define a control flow that is a subset of the package control flow
4.They group the package into multiple separate control flows, each
containing one or more tasks and containers that run within the overall
package control flow
What is a stored procedure? Please select all the relevant op ons MCQ 2&3&5 1&4&5 2&4 3&4&5 1&2&3
1.A collection of compiled T-SQL commands that are directly accessible by
SQL Server
2.A collection of commands written in any base .NET language that are
directly accessible by SQL Server
121
3.Commands placed in a stored procedure are interpreted one line at a
me during execu on
4.Commands placed in a stored procedure are executed as one batch
5.Stored procedures reduce network traffic
What are the benefits of using a stored procedure? MCQ 1&3&5 1&2&4 3&5 2&3&5 2&3&4
1.The procedure can reside outside the SQL Server instance, hence
manageable
122 2.Precompiled execu on, hence faster
3.Reduced network traffic
4.Efficient reuse of code
5.Efficient compilation
How are stored procedures similar to procedures developed in other MCQ 1&2&3&4 1&4 2&3&4 1&2&3
programming languages?
1.Accept input parameters and return multiple values in the form of
output parameters to the calling procedure or batch
123 2.Contain programming statements that perform operations in the
database, including calling other procedures
3.Return a status value to a calling procedure or batch to indicate success
or failure
4.Can be interpreted externally
Iden fy the different types of stored procedures: MCQ 1&3&4 1&2&4 1&3 3&4
1.User-defined stored procedures - Transact SQL & CLR
124 2.Compiled Stored Procedures
3.Extended Stored Procedures
4.System Stored Procedures
Iden fy steps in handling errors in a stored procedure. MCQ 2&3&4 1&3 1&3&4 2&4
1.When an error condition is detected in a T-SQL statement that is inside a
TRY block, control is immediately passed to the CATCH block
2.The Error is processed in the TRY block
125
3.The Error is processed in the CATCH block
4.T-SQL statements in the TRY block that follow the statement that
generated the error are not executed
Which statements are true about Extended stored procedures? MCQ 1&2&4 1&3 2&4 2&3&4
1.They are inherited from another user defined stored procedure
2.They are DLLs developed in a programming language like c that an
instance of Microso SQL Server can dynamically load and run
126
3.They run directly in the address space of an instance of SQL Server
4.They are programmed by using the SQL Server Extended Stored
Procedure API
Which statements are true about Local Temporary stored procedure? MCQ 1&3&5 2&4 1&4 2&3&4 2&5
1.A local temporary procedure is visible to all local connec ons
2.A local temporary procedure is visible only to the connection that
created it
3.A local temporary procedure is dropped through a Clean-up job that is
127 created & triggered by the user at the end of the current session
4.A local temporary procedure is automatically dropped at the end of the
current session
5.A local temporary procedure can be used by all the local users
Which statements are true about CLR stored procedures? MCQ 2&4&5 2&4 1&3&5 1&3 1&2&4
1.It is a reference to a Microsoft .NET Framework common language
run me (CLR) method
2.The method can take and return user-supplied parameters
128 3.The method can only take input parameters
4.They are implemented as public, static methods on a class in a .NET
Framework assembly
5.They are implemented as private, protected methods on a class in a .NET
Framework assembly
Which statements are true about Global Temporary stored procedure? MCQ 1&4 2&3 4&5 1&2&3 3&4&5
1.A Global temporary procedure is available to all connec ons
2.A Global temporary procedure is available to all connections with explicit
EXECUTE permission
3.A Global temporary procedure is dropped when the clean-up function is
called by the calling procedure
129
4.A Global temporary procedure is dropped at the end of the last session
using the procedure
5.If a global temporary procedure is created, all users with EXECUTE
permissions can access it & permissions can also be revoked explicitly
What are your observations on Temporary stored procedures with respect MCQ 1&5 3&4 2&3 1&3&4 2&4&5
to performance?
1.Heavy use of temporary stored procedures can lock system tables
permanently in tempdb and adversely affect performance
2.Heavy use of temporary stored procedures can create contention on the
system tables in tempdb and adversely affect performance
130 3.It is recommended that sp_executesql be used instead of temporary
stored procedures
4.sp_executesql stores data in the system tables and therefore avoids the
problem
5.sp_executesql discards data from the system tables and therefore avoids
the problem
EXECUTE AS clause can be used to define the execution context of which MCQ 1&3&4&5 2&3&4&5 1&2&3&5 1&2&3&4 1&3&5
all user-defined modules?
1.Messages
131 2.Func ons
3.Procedures
4.Queues
5.Triggers
MCQ 1&2&3&5 1&2&4 3&4&5 1&3&5 2&3&4
Which statements are true about disabling CLR integra on in SQL Server?
1.You can disable CLR integration by setting the clr enabled option to
FALSE
140
2.You can disable CLR integra on by se ng the clr enabled op on to 0
3.When you disable CLR integra on, SQL Server unloads all CLR rou nes
4.When you disable CLR integration, SQL Server stops executing all CLR
rou nes
5.When you disable CLR integration, SQL Server unloads all application
domains
How does EXTERNAL_ACCESS permission set work? MCQ 1&4 2&3&4 1&2&3 2&3
1.Allows access only to external assemblies with minimal access to internal
computa on
141 2.Allows access to internal computa ons
3.Allows access to external system resources such as files, networks &
environment variables
4.Allows access to Registry
What are the conditions for assemblies created by using EXTERNAL ACCESS MCQ 1&3&4 2&3 3&4 1&4
permission sets?
1.The assembly code should be type-safe
2.The assembly should contain only static data members in its classes
142
unless they are marked as read-only
3.The classes in the assembly must contain finalizer methods
4.The classes or methods of the assembly should be annotated only with
allowed code attributes
What happens if you specify the ENCRYPTION option in CREATE FUNCTION MCQ 1&3 2&3&4 2&4 1&2
statement?
1.The SQL Statements used to define the func on are encrypted
143
2.The statements are encrypted into a .NET assembly
3.The statements are encrypted in the syscomments table
4.The statements are encrypted in the master table
What happens if the SCHEMABINDING option is used in CREATE FUNCTION MCQ 1&2&3 1&3 3&4 2&4
statement?
1.The User-defined function cannot be deleted unless the database is
dropped
2.The User-defined function cannot be modified unless the database is
144 dropped
3.The database objects that the function references cannot be altered or
dropped unless the func on is dropped first
4.The database objects that the function references cannot be altered or
dropped unless the schema binding of the function is removed
Which statements are true about parameters to user-defined func ons? MCQ 1&2 1&3&4 3&4 2&3&4
1.User-defined functions take zero or more input parameters and return
either a scalar value or a table
2.User-defined functions take zero or more input parameters and return
only an integer
145
3.A func on can have a maximum of 1024 input parameters
4.When a parameter of the function has a default value, the keyword
DEFAULT must be specified when calling the function to get the default
value
How are User-defined functions different from User-defined Stored MCQ 2&4 1&3&4 1&2 1&3
Procedures?
1.In User-defined function the default parameter is specified with a
DEFAULT keyword
146
2.In User-defined function omitting the parameter also implies default
value
3.User-defined func ons do not support output parameters
4.User-defined functions do support output parameters
When you execute user-defined functions that return scalar values, how MCQ 2&3&4 1&2&3&4 1&3 1&2&4
are the parameters specified?
1.The argument values are enclosed in parentheses
147 2.The argument values are not enclosed in parentheses
3.Parameter names can be specified
4.If parameter names are specified, the argument values do not have to be
in the same sequence as the parameters
Which are the different types of scalar valued func ons? MCQ 1&4 2&3 3&4 1&2&3
1.Internal
148 2.External
3.Determinis c
4.Nondeterministic
Which all data types cannot be return types of a scalar func on? MCQ 1&2&3&4 2&4&5 1&2&4 1&3&5 1&2&4&5
1.text
2.ntext
149
3.integer
4.image
5.Cursor
Which statements are true about an Inline scalar func on? MCQ 1&2&4 1&3 2&4 1&2
1.There is no func on body
2.The function body defined in BEGIN…END block contains a series of T-
150 SQL statements
3.The scalar value is a result of a single statement
4.The scalar value is a result of all the statements in the BEGIN…END block
Which statements are true about a mul statement scalar func on?
1.There is no func on body
151
2.The function body defined in BEGIN…END block contains a series of T-
SQL statements
3.The scalar value is a result of a single statement
4.The scalar value is a result of all the statements in the BEGIN…END block
MCQ 1&2&4 2&4 1&3 3&4
Which statements are true about return types of CLR Scalar values
func ons?
1.The type returned from a scalar valued function can be any of the scalar
data types supported by SQL Server, except varchar, char, rowversion,
152 text, ntext, image, mestamp, table, or cursor
2.The type returned from a scalar valued function should be from the
following list varchar, char, rowversion, text, ntext, image, timestamp,
table, or cursor
3.Scalar valued functions must ensure a match between the SQL Server
data type and the return data type of the implementa on method
4.Scalar valued functions must ensure that the return type is a recordset
What is the difference between deterministic & non-deterministic scalar- MCQ 2&3 1&2 3&4 1&4
valued func on?
1.A non-deterministic function always returns the same result when it is
called with a specific set of input parameters
2.A deterministic function always returns the same result when it is called
153
with a specific set of input parameters
3.A non-deterministic function may return different results when it is
called with a specific set of input parameters
4.A deterministic function may return different results when it is called
with a specific set of input parameters
Which statements are true about an inline table-valued func on? MCQ 2&4 1&3&4 1&3 1&2
1.There is no func on body
2.The function body defined in BEGIN…END block contains a series of T-
154
SQL statements
3.The table is the result set of a single SELECT statement
4.The table is the result set of a multiple SELECT statements
MCQ 1&3&4 2&4 1&3 1&2
Which statements are true about mul statement table-valued func on?
1.There is no func on body
2.The function body defined in BEGIN…END block contains a series of
155
Transact-SQL statements that build and insert rows into the table that will
be returned
3.The table is the result set of a single SELECT statement
4.The table is the result set of a multiple SELECT statements
Which of the following statements are applicable to built-in table-valued MCQ 1&2&3 3&4 2&3 1&4
func ons?
1.The invocation of built-in user-defined functions is always qualified with
the sys schema qualifier
2.The invocation of built-in user-defined functions can be either
156
unqualified or can use the sys schema qualifier
3.You should use the sys schema qualifier because it prevents conflicts
with user-defined func ons of the same name
4.You should use the sys schema qualifier because it suppresses user-
defined functions of the same name
How do you implement CLR table-valued func ons? MCQ 1&2&4 1&3&4 2&3 2&4
1.They are implemented as methods on a class in a Microsoft .NET
Framework assembly
157
2.IEnumerable interface has to be implemented
3.A custom interface has to be implemented
4.A collection or an array is converted to a result set
MCQ 1&3&4 1&4 2&4 2&3
Which statements are true about Table-valued parameters?
1.They are user-defined scalar values that are passed into a procedure or
func on
158
2.They are user-defined table types that are passed into a procedure or
func on
3.They provide an efficient way to pass mul ple rows of data to the server
4.They provide an efficient way to pass a connection to the server
How is the informa on returned from table-valued func ons? MCQ 2&3 1&4 1&2&4 only 1
1.Information may be returned from table-valued functions using output
parameters
159 2.Information may be returned from table-valued functions using return
statements
3.You must specify the parameters by value
4.You must specify the parameters by reference
MCQ 2&4 3&4 1&3 1&2
Which statements are true about a mul statement scalar func on?
1.There is no func on body, no declara on
160
2.The function body defined in BEGIN…END block contains a series of T-
SQL statements
3.The scalar value is a result of a single statement with mul value
4.The scalar value is a result of all the statements in the BEGIN…END block
MCQ 1&2&3&4 2&3&5 1&2&5 1&3&5 1&2&4&5
What does the Query execu on plan define? MCQ 1&4 2&3 1&3 3&4
1.The sequence in which the source tables are accessed
183 2.The sequence in which the rows are accessed
3.The methods used to extract data from each table
4.The methods used to arrange data in each table
What does the input to Query Op mizer consist of? MCQ 3&4 1&2&4 1&3 1&2&3
1.The query
184 2.The database schema
3.The database sta s cs
4.The selected rows
How does SQL server execute a stored procedure or a trigger? MCQ 2&4&5 1&3 4&5 1&2&4 1&3&4&5
1.SQL Server stores only the source for stored procedures and triggers
2.SQL Server keeps the stored procedures & triggers in compiled form for
future execu on
3.When a stored procedure or trigger is first executed, the source is
185 compiled into an execu on plan
4.If the stored procedure or trigger is again executed before the execution
plan is aged from memory, the relational engine detects the existing plan
and reuses it
5.If the execution plan has aged out of memory, a new plan is built
What does the SELECT statement define? MCQ 1&2&5 2&3&4&5 3&5 1&2&4 1&3
1.The format of the database
2.The format of the result set. This is specified mostly in the select list
3.The tables that contain the source data. This is specified in the FROM
clause
4.How the tables are logically related for the purposes of the SELECT
186 statement. This is defined in the join specifications, which may appear in
the WHERE clause or in an ON clause following FROM
5.The conditions that the rows in the source tables must satisfy to qualify
for the SELECT statement. These are specified in the WHERE and HAVING
clauses
How does SQL server handle Parallel query processing? MCQ 1&2&3 1&3&4 2&4 1&2
1.During query optimization, SQL Server looks for queries or index
opera ons that might benefit from parallel execu on
2.SQL Server inserts exchange operators into the query execution plan to
187 prepare the query for parallel execu on
3.After exchange operators are inserted, the result is a parallel-query
execu on plan which can use more than one thread
4.After exchange operators are inserted, the queries are compiled into an
executable
How is the support for XML integrated into SQL Server? MCQ 1&3&4 2&4 1&3 1&2&3
1.Support for the xml data type
2.Ability to specify an XQuery query against XML data stored in columns
188
and variables of the xml type
3.Ability to handle bulk loading of XML data
4.Ability to merge XML
What kind of data does the XML datatype store in SQL Server? MCQ 1&2&4 1&4 3&4 2&3
1.Office documents
189 2.Memory maps
3.XML documents
4.Fragments
MCQ 1&4 2&3 1&3 2&4
What does the following syntax do? Please select all the relevant op ons
CREATE TABLE T1(Col1 int primary key, Col2 xml)
190
1.It creates a row in a table
2.It creates a column of type int in the table & sets it as a primary key
3.It creates a column of type xml
4.It creates an empty table
MCQ 1&2&3&5 1&2&4 3&4&5 1&2&3 1&5
II: It ensures that an application would not be able to access memory that
it is not authorized to access.
200
Which of the following are valid .NET CLR JIT performance counters?
III: Number of methods that failed to compile with the standard JIT
Which of the following components of the .NET framework provide an MCQ .NET class libraries Common Language Common Language Component
202 extensible set of classes that can be used by any .NET compliant Runtime Infrastructure Object Model
programming language?
Which of the following .NET components can be used to remove unused MCQ Common Language CLR Garbage Collector Class Loader
203
references from the managed heap? Infrastructure
Which of the following cons tutes the .NET Framework? MCQ 1&2&5 2&3 3&4&5 1&2&4 1&2&3&4
1.ASP.NET Applica ons
2.CLR
204
3.Frame Work Class Library
4.WinForm Applica ons
5.Windows Services
Which of the following assemblies can be stored in Global Assembly MCQ Private Assemblies Friend Assemblies Shared Assemblies Public Assemblies
205
Cache?
206 Code that targets the Common Language Runtime is known as: MCQ Unmanaged Distributed Legacy Managed Code
Which of the following statements is correct about the .NET Framework? MCQ .NET Framework uses .NET Framework is .NET Framework .NET Framework
DCOM for achieving built on the DCOM uses DCOM for uses DCOM for
language technology. making transition creating
207
interoperability. between managed unmanaged
and unmanaged applications.
code.
208 Which of the following is the root of the .NET type hierarchy? MCQ System.Object System.Type System.Base System.Parent
Which of the following are parts of the .NET Framework? MCQ 3&4 1&2&3 2&3&4 1&2
1.The Common Language Run me(CLR)
209 2.The Framework Class Libraries
3.Microso Published Webservices
4.Mobile Applications
What is wrong in the following code? MCQ every case should have case 3 should not switch statement The code is
int choice=3 a 'break' statement have a 'break' cannot have an correct
switch (choice) statement integer as an
{ argument
case 1:
MessageBox.Show(“One”);
210
case 2:
MessageBox.Show(“Two”);
case 3:
MessageBox.Show(“Three”);
break;
}
What does following code denote, choose mul ple if applicable? MCQ 1&2&3 3&4 2&3 1&2
string strVal = “Y”;
while (strVal == “Y”);
211 1.Condi onal statement
2.looping statement
3.unending loop
4.unreachable loop
What are your observa ons on the following code? MCQ while loop will get while loop will never while loop is Integer variable
int choice=3; executed 2 times get executed syntactically cannot be used in
212
while (choice == 2) ; incorrect the while loop
MessageBox.Show("Entered");
What are your observa on on the following syntax? MCQ 1&3&4 2&4 1&4 2&3
for (Boolean expression; ini alizer; modifier)
[{]
statement(s)
213 [}]
1.The syntax is correct
2.ini alizer should be the first statement
3.ini alizer should be the last statement
4.boolean expression should be the second statement
Which all values can a bool type have? MCQ 1&4 2&3 only 1 1&2 only 2
1.TRUE
214 2.FALSE
3.0
4.1
What is the result of the following code snippet? MCQ Value ‘\x0041’ will be Value ‘41’ will be Value 'a' will be Value 'A' will be
char examGrade = ‘\x0041’; assigned to variable assigned to variable assigned to variable assigned to
215 examGrade of type examGrade of type examGrade of type variable
char char char examGrade of
type char
Please Iden fy values that sbyte can hold. MCQ 1&2&4 2&3&4 1&4 1&3
1.-128
216 2.128
3.127
4.256
Iden fy statements that are true for short type. MCQ 2&4 1&3 1&2&4 3&4
1.short type can hold 32 bits of data
217 2.short type can hold 16 bits of data
3.short type can hold data from 0 to 65535
4.short type can hold data from -32768 to 32767
Which statements are true about unit type? MCQ 1&2&3 1&4 2&3 3&4
1.unit type can hold 32 bits of data
218 2.unit type can hold 16 bits of data
3.unit type can hold data from -2147483648 to 2147483647
4.unit type can hold data from 0 to 4294967295
Which data types are of size 64 bits? MCQ 1&2&3 2&4&5 3&4 1&5 2&3&5
1.int
2.long
219
3.ulong
4.float
5.Double
Which statements are true about Out parameters? MCQ 1&3&4 3&4 1&2 2&3
1.Out parameters must be definitely assigned before calling the method
2.Out parameters don’t need to be definitely assigned before calling the
method
220 3.Out parameters must be definitely assigned before the method returns
4.Out parameters value need not change before the method returns
Please iden fy the different types of method parameters. MCQ 3&4&5 1&2&3&5 1&3&4 1&5 1&4&5
1.Value
2.ref
221
3.out
4.in
5.params
What does the following code denote? MCQ Following code is an Following code Following code is an Following code
namespace MyMethods example of Inheritance demonstrates example of demonstrates
{ Polymorphism Extension Method abstraction
}
Which statements are true about Extension Methods? MCQ 2&3 1&3&4 1&4 1&2&3
1.Extension methods are defined as protected methods
223 2.Extension methods are defined as sta c methods
3.Extension methods are called by instance method syntax
4.Extension methods are called like static methods
Which of the following statements are correct? MCQ 2&3 1&4 1&3 3&4
1.An argument passed to a ref parameter need not be ini alized first
2.Variable passed as out arguments need to be initialized prior to being
passed
224 3.Argument that uses params keyword must be the last argument of
variable argument list of a method.
4.Pass by reference eliminates the overhead of copying large data items.
Which of the following statements are correct? MCQ 3&4 1&2&3 2&4 1&3
1.C# allows a func on to have arguments with default values.
2.C# allows a func on to have variable number of arguments.
226 3.Omitting the return value type in method definition results into an
excep on.
4.params is used to specify the syntax for a function with variable number
of arguments.
How many values is a function capable of returning? MCQ 1 0 Depends upon how Any number of Depends
many params values. upon how
227 arguments does it many ref
use. arguments
does it use.
Which of the following CANNOT occur multiple number of times in a MCQ namespace Entrypoint Class Function
228
program?
Which of the following statements are correct about subroutines used in MCQ 1&3&4 2&3&4 1&4 2&3
C#.NET?
1.If we do not return a value from a subroutine then a value -1 gets
229 returned.
2.Subrou ne defini ons cannot be nested.
3.Subrou ne can be called recursively.
4.Subroutine calls can be nested.
What does the following code do? MCQ 1&2 2&3 3&4 1&4
enum Month: byte
{
January,
February,
March,
April,
May,
June,
230
July,
August,
September,
October,
November,
December
};
1.Declares an enum
2.Change the integral type for each member from int to byte
3.Inherit enum from type byte
4.Generates an error
MCQ 0 6 7 11
In the code below, what will be the value of enum member Sunday
231
enum Weekday { Monday = 1, Tuesday, Wednesday, Thursday, Friday,
Saturday = 10, Sunday }
What are your observa ons on the following code? MCQ 2&3&4 1&2&5 3&4 2&5 1&2&4
[Flag]
[ Serializable]
public enum ProblemStatus
{
Assigned = 0x0001,
NoProblem = 0x0002,
Open = 0x0004,
232 Resolved = 0x0008
}
1.The code uses mul ple a ributes
2.Mul ple a ributes can also be specified together
3.Mul ple a ributes have to be specified one a er the other
4.Multiple attributes can appear in same square brackets separated by a
comma
5.Multiple attributes can appear in same square brackets separated by a
space
What all statements are true about System.Enum struct? MCQ 2&4 1&3 1&3&4 1&2
1.Using System.Enum struct you can convert string to enum
233 2.Using System.Enum struct you can convert object to enum
3.loop through a list of enum members
4.Using System.Enum struct you can convert ArrayList to enum
What does the following code denote? MCQ Conversion of string to Conversion of enum Conversion of Conversion of
234 enum Weekday { Mon = 1, Tue, Wed, Thu, Fri, Sat = 10, Sun } enum types types to string integer to enum enum types to
dayStr = Enum.GetName(typeof(Weekday), Weekday.Thu); types integer
MCQ Conversion of string to Conversion of enum Conversion of Conversion of
What does the following code denote? enum types types to string integer to enum enum types to
235
enum Weekday { Mon = 1, Tue, Wed, Thu, Fri, Sat = 10, Sun } types integer
Weekday Sunday = (Weekday)Enum.ToObject(typeof(Weekday), 11);
What does the following code denote? MCQ Following code iterates Following code Following code Following code
foreach (var day in Enum.GetValues(typeof(Weekday))) through an ArrayList iterates through an iterates through a iterates through
236 { Array HashTable each member of
Console.WriteLine(day); an enum
}
Which statements are true about Structs? MCQ 1&3 2&4 1&4 2&3
1.Structs are value types
237 2.Structs are reference types
3.Structs get created on stack when instantiated
4.Structs get created on heap when instantiated
using System; MCQ 1&3&4 3&4 1&2&3 2&3&4
struct SimpleStruct
{
private int xval;
public int X
{
get
{
return xval;
}
set
238
{
if (value < 100)
xval = value;
}
}
public void DisplayX()
{
Console.WriteLine("The stored value is: {0}", xval);
}
}
1.Following code is an example of a class
Can structs have constructors? MCQ 1&3 3&4 2&4 2&3
1.Structs cannot have constructors
239 2.Structs can have constructors
3.Constructors cannot have parameters
4.Constructors must take parameters
What are your observa ons on the following code? MCQ 1&4 1&3 2&4 2&3
interface IImage
{
void Paint();
}
set
{
if (i >= 5 && i < 25)
{
customerNames [i] = value;
}
}
}
Which statements are true about Indexers? MCQ 1&2&4 3&4 1&2 2&3&4
1.Indexers like Proper es have get and set accessors
2.Indexers like Arrays use square bracket syntax to access members
255
3.Indexers are Read-Only
4.Indexers like Methods can have parameters
Which all statements are true about Proper es? MCQ 1&2&3 1&4 1&3 2&4
1.Proper es encapsulate access to public fields
2.Proper es encapsulate access to private fields
256 3.With Properties even if the implementation of private state changes, the
implementa on is not broken
4.With Properties even the implementation of private state cannot change
Which all are the main features of Sta c classes? MCQ 2&4 1&3 1&2&5 2&3&4 1&4&5
1.They only contain sta c members
2.They cannot be instan ated
257
3.They have to be instan ated
4.They can be inherited
5.They are sealed
Which of the following statements is correct about the C#.NET code MCQ Contents of s1 and s2 The two objects will Contents of the two The two objects
snippet given below? class Student s1, s2; // Here 'Student' is a user- will be exactly same. get created on the objects created will will always be
258 defined class. stack. be exactly same. created in
s1 = new Student(); adjacent memory
s2 = new Student(); locations.
Which of the following statements is correct about the C#.NET code MCQ j cannot be declared as DisplayData() cannot DisplayData() cannot There is no error
snippet given below? class Sample public. be declared as access j. in this class.
{ private.
private int i;
public Single j;
private void DisplayData()
{
259
Console.WriteLine(i + " " + j);
}
public void ShowData()
{
Console.WriteLine(i + " " + j);
}
}
Which of the following statements is correct? MCQ Procedural Object Oriented Classes and objects Object Oriented
Programming paradigm Programming are corner stones of Programming
is different than paradigm stresses on structured paradigm gives
structured dividing the logic programming equal importance
260
programming into smaller parts paradigm. to data and the
paradigm. and writing procedures that
procedures for each work on the data.
part.
Which of the following statements is correct about classes and objects in MCQ Class is a value type. Since objects are Objects of smaller Objects are
C#.NET? typically big in size, size are created on always nameless.
261
they are created on the heap.
the stack.
Which of the following statements are correct? MCQ 1&3&4 2&3 1&2&3 1&4
1.Instance members of a class can be accessed only through an object of
that class.
2.A class can contain only instance data and instance member func on.
262 3.All objects created from a class will occupy equal number of bytes in
memory.
4.A class is a blueprint or a template according to which objects are
created.
Which of the following is the correct way to create an object of the class MCQ 2&4 1&3 1&2&3 2&3&4
Sample ?
1.Sample s = new Sample();
263
2.Sample s;
3.Sample s; s = new Sample();
4.s = new Sample();
A variable which is declared inside a method is called a________variable. MCQ Serial Local Private Static
264
Which of the following is the feature of a local variable? MCQ It can be used It must accept a class It must declared It represent the
265 anywhere in the within class class object
program
Which of the following method is available in same name but with MCQ Over Loading Loading Multiplexing Duplexing
266
different parameters?
What is the output of the code public class B : A { }? MCQ Errors It defines the class It defines the class It defines the
that inherit the that inherit the class cannot
properties of the properties of the inherit the
267
Class A Class A but cant properties of the
access the private Class A
methods
An instance variable: MCQ is an object of a class represents an is a method of a is a property of
268 attribute of an object class class
What you have understood from the following code? class Test: Form { } MCQ Creates the class Test : Creates the class Creates the class All of the listed
269 Form Test that inherits the form that inherits options
class Form the class Test
MCQ Creates the class Test : Creates the class Creates the class All of the listed
270 Form Test that inherits the form that inherits options
What you have understood from the following code? class Test: Form { } class Form the class Test
What does the following code denote? MCQ Encapsulation Inheritance Overloading Overriding
How can you call Base class members from a derived class? MCQ 1&2 3&4 2&3 1&4
1.By declaring them as private
272 2.By declaring them as public
3.By declaring them as protected
4.By declaring them as static
class Contact MCQ 2&4 1&3 1&3&4 1&2
{
public string FullAddress()
{
// some code
}
}
class WebSite
{
// members
273
}
return fullAddress;
MCQ 1&3 1&2&4 2&4 1&2&3
public class Contact
{
public string Name { get; set; }
public string Email { get; set; }
public string Address { get; set; }
public string City { get; set; }
Which of the following statements are true for Private Access? MCQ 2&4 1&3 1&3&4 2&3
1.Private access is the least restric ve access
2.Private access is the most restric ve access
282 3.Only members within an object may access another member marked as
private
4.Members outside an object can access another members marked as
private
Which of the following can be declared in an interface? MCQ 1&3&4 2&3&4 1&2 1&2&4
1.Proper es
283 2.Methods
3.Enumera ons
4.Events
A class implements two interfaces each containing three methods. The MCQ 12 bytes 24 bytes 0 byte 8 bytes
284 class contains no instance data. Which of the following correctly indicate
the size of the object created from this class?
MCQ One class can In a program if one From two base Properties can be
implement only one class implements an interfaces a new declared inside an
interface. interface then no interface cannot be interface.
285 other class in the inherited.
same program can
Which of the following statements is correct about an interface used in implement this
C#.NET? interface.
MCQ All interfaces are Interfaces can be All interfaces are Interfaces can
derived from an inherited. derived from an contain only
286
Which of the following statements is correct about Interfaces used in Object class. Object interface. method
C#.NET? declaration.
MCQ If a class implements an A class cannot An interface can An interface can
interface partially, then implement an contain static contain static
287
Which of the following statements is correct about an interface used in it becomes an abstract interface partially. methods. data.
C#.NET? class.
MCQ One interface can be An interface can be A class that The functions
implemented in implemented by implements an declared in an
another interface. multiple classes in interface can interface have a
288
the same program. explicitly implement body.
members of that
Which of the following statements is correct about an interface? interface.
Which of the following statements is correct? MCQ When a class inherits An interface cannot interfaces members To implement an
an interface it inherits contain the signature are automatically interface
member definitions as of an indexer. public. member, the
well as its corresponding
289
implementations. member in the
class must be
public as well as
static.
Which of the following can implement an interface? MCQ 1&3&4 2&4 1&2 3&4
1.Data
2.Class
290
3.Enum
4.Structure
Which all are non-generic collec ons from the list? MCQ 1&5 2&3&5 1&4 2&4 3&4
1.ArrayList
2.Dic onaries
291
3.Lists
4.Stacks
5.Hashtable
Which are the different mechanisms to handle collec ons of objects? MCQ 2&3 1&4 1&2&3 1&3&4
1.Arrays
2.Enums
292
3.ArrayLists
4.Generics
How is ArrayList different from Array? MCQ 1&3&4 1&2 2&3 3&4
1.Both are same
293 2.ArrayList length can increase automa cally
3.ArrayList can work generically with any type
4.Array can work generically with any type
What are your observa ons on the following code? MCQ The code has errors You cannot assign The ArrayList can The ArrayList can
two different data hold both the values hold only integer
int iEmpNo = 10; types to the same values
string strEmpName = "Johm Miller"; ArrayList
294
ArrayList arrlstValues=new ArrayList();
arrlstValues.Add(iEmpNo);
arrlstValues.Add(strEmpName);
What are your comments on the following code? MCQ 2&4 1&3 1&2 3&4
Hashtable openWith = new Hashtable();
openWith.Add("txt", "notepad.exe");
openWith.Add("bmp", "paint.exe");
295 openWith.Add("bmp", "paint.exe");
openWith.Add("r ", "wordpad.exe");
1.It is an example of Hashtable
2.It is an example of ArrayList
3.HashTable cannot have duplicate keys
4.HashTable cannot have duplicate values
Which statements are true about HashTables? MCQ 2&3 1&3&4 1&4 2&4
1.The key can be the null reference
296 2.The key cannot be the null reference
3.The value can be the null reference
4.The value cannot be the null reference
Which all collec ons can be implemented using Generics? MCQ 1&3&4 1&2 2&3 2&3&4
1.Arrays
297 2.Dic onaries
3.Lists
4.Stacks
Which of the following problems of non-generic collection does generics MCQ 1&3 1&2&3 2&4 1&4
solve?
1.Lack of flexibility
298
2.Lack of type safety
3.Lack of security
4.Lack of performance while using value types
What does the generics constraint of type Interface do? MCQ 1&4 2&3 1&2&4 2&3&4
1.Forces type parameter to inherit the base class defined by the constraint
2.Forces type parameter to inherit the interfaces defined by the constraint
3.Ensures that the object passed as a parameter implements specific
299
members
4.Forces type parameter to be a reference type object
Which all statements are true about Base class Generics constraints? MCQ 1&4 2&3 1&2&4 1&3
1.Force type parameter to inherit the base class defined by the constraint
2.Force type parameter to inherit the interfaces defined by the constraint
3.Ensure that the object passed as a parameter implements specific
300 members
4.Ensure that a parameter inherits the specified base class
MCQ 1&3&4 2&4 1&2 1&4
What are your observa ons on the following code?
private void CheckForReferenceType<T>(T type) where T : class, IHoldVal
{
type.Val = 5;
301
}
1.Code denotes usage of Generics Constraint
2.Code denotes Base Class Generics constraint
3.Code denotes Interface Generics constraint
4.Code denotes Reference Type Generics Constraint
What are your observa ons on the following code? MCQ 2&3&4 1&2 1&3 2&4
private void CheckForValueType<T>(T type)
where T : struct, IHoldVal
{
type.Val = 5;
302
}
1.Code denotes usage of Generics Constraint
2.Code denotes Base Class Generics constraint
3.Code denotes Value Type Generics Constraint
4.Code denotes Reference Type Generics Constraint
What are your observa ons on the following code? MCQ 2&3 1&4 1&2&4 3&4
private void PrintEnumerableValues<T, U>(T myItems) where T :
IEnumerable<U>
{
foreach (U item in myItems)
{
303 Console.WriteLine(item);
}
}
1.Code denotes usage of Generics Constraint
2.Code denotes Reference Type Generics constraint
3.Code denotes Base Class Generics constraint
4.Code denotes Interface Generics constraint
What does the following code denote? MCQ A Class that derives A Class that A Class that derives A Class that
public class CustomerList : List<Customer> from an Indexer implements an from a Generic type derives from a
{ Interface Value type
public int Dis nctCi es
{
get
304 {
// compute number of unique ci es
// that customers live in
return 7;
}
}
}
For the code snippet shown below, which of the following statements are MCQ Addition will produce Result of addition is Program will Compiler will
valid? public class Generic<T> result 1. system-dependent. generate run-time report an error:
{ exception. Operator '+' is
public T Field; not defined for
public void TestSub() types T and int .
{
T i = Field + 1;
}
305 }
class MyProgram
{
sta c void Main(string[] args)
{
Generic<int> gen = new Generic<int>();
gen.TestSub();
}
}
Which of the following statements are valid about generics in .NET MCQ 2&3 1&3&4 1&4 1&2
Framework?
1.Generics is a language feature.
306 2.We can create a generic class, however, we cannot create a generic
interface in C#.NET.
3.Generics delegates are not allowed in C#.NET.
4.Generics are useful in collection classes in .NET framework.
For the code snippet shown below, which of the following statements are MCQ Program will compile A non generic class Compiler will Program will
valid? and on execution will Hello cannot have generate an error. generate a run-
print: IndiaBIX 4.2 generic subroutine. time exception.
public class TestIndiaBix
{
public void TestSub<M> (M arg)
{
Console.Write(arg);
}
307 }
class MyProgram
{
sta c void Main(string[] args)
{
TestIndiaBix bix = new TestIndiaBix();
bix.TestSub("IndiaBIX ");
bix.TestSub(4.2f);
}
}
For the code snippet given below, which of the following statements is MCQ It will print string Name Generic Compiler will give an Member Field of
valid? "Hello " on the cannot be used as error. class Generic is
console. a class name not accessible
public class Generic<T> because it's a directly.
{ keyword.
public T Field;
}
class Program
308
{
sta c void Main(string[ ] args)
{
Generic<String> g = new Generic<String>();
g.Field = "Hello";
Console.WriteLine(g.Field);
}
}
MCQ 1&3 1&4 1&2&3 2&3
For the code snippet given below, which of the following statements are
valid? public class MyContainer<T> where T: IComparable
{
// Insert code here
309 }
1.Class MyContainer requires that it's type argument must implement
IComparable interface.
2.Type argument of class MyContainer must be IComparable.
3.Compiler will report an error for this block of code.
4.This requirement on type argument is called as constraint.
Which of the following statements is valid about advantages of generics? MCQ Generics shift the Generics require use Generics provide Generics
burden of type safety of explicit type type safety without eliminate the
310 to the programmer casting. the overhead of possibility of run-
rather than compiler. multiple time errors.
implementations.
Which all are the most severe excep ons? MCQ 1&2&4 1&3 2&4 1&3&4
1.Execu onEngineExcep on
311 2.InvalidCastExcep on
3.StackOverflowExcep on
4.OutOfMemoryException
Which statements are true about interop excep ons? MCQ 1&3 1&2 2&4 3&4
1.Interop excep ons are derived from Applica onExcep on
312 2.Interop excep ons are derived from SystemExcep on
3.Interop excep ons are extended by Applica onExcep on
4.Interop exceptions are extended by ExternalException
Which all excep ons are derived from SystemExcep on? MCQ 1&2&4 2&3&4 1&4 2&3
1.Applica onExcep on
313 2.ExternalExcep on
3.ArguementExcep on
4.InvalidOperationException
Which of the following statements is correct about an Exception? MCQ It occurs during It occurs during It occurs at run-time. It occurs during
314 compilation. linking. Just-In-Time
compilation.
Which of the following statements is correct about the C#.NET program MCQ Value 44 will get It will output: Index It will output: It will output:
given below? using System; assigned to a[6] . out of bounds Remaining program Index out of
namespace IndiabixConsoleApplica on bounds
{ Remaining
class MyProgram program
{
sta c void Main(string[] args)
{
int index = 6;
int val = 44;
int[] a = new int[5];
315
try
{
a[index] = val ;
}
catch(IndexOutOfRangeExcep on e)
{
Console.Write("Index out of bounds ");
}
Console.Write("Remaining program");
}
}
Which of the following statements are correct about exception handling in MCQ 2&4 1&3 1&3&4 1&2
C#.NET?
1.If an exception occurs then the program terminates abruptly without
ge ng any chance to recover from the excep on.
316 2.No matter whether an exception occurs or not, the statements in the
finally clause (if present) will get executed.
3.A program can contain mul ple finally clauses.
4.finally clause is used to perform clean up operations like closing the
network/database connections.
Which of the following statements are correct about exception handling in MCQ 2&4 1&3 1&2&3 1&3&4
C#.NET?
1.If our program does not catch an excep on then the .NET CLR catches it.
317 2.It is possible to create user-defined excep ons.
3.All types of excep ons can be caught using the Excep on class.
4.CLRExceptions is the base class for all exception classes.
Which of the following statements is correct about the C#.NET program MCQ It will output: Index out It will output: Bad It will output: Bad It will output:
given below if a value "6" is input to it? using System; of bounds Remaining Format Remaining Format Remaining
namespace IndiabixConsoleApplica on program program program
{
class MyProgram
{
sta c void Main(string[] args)
{
int index;
int val = 44;
int[] a = new int[5];
318
try
{
Console.Write("Enter a number:");
index = Convert.Tolnt32(Console.ReadLine());
a[index] = val;
}
catch(FormatExcep on e)
{
Console.Write("Bad Format");
}
catch(IndexOutOfRangeExcep on e)
Which of the following statements are correct about exception handling in MCQ 1&2&3 3&4 1&4 2&3
C#.NET?
1.try blocks cannot be nested.
2.In one func on, there can be only one try block.
319
3.All values set up in the excep on object are available in the catch block.
4.While throwing a user-defined exception multiple values can be set in
the exception object.
Which of the following statements is correct about the C#.NET program MCQ It will output: Exception It will output: It will output: It will output:
given below if a value "ABCD" is input to it? using System; occurred Remaining program Remaining program Exception
namespace IndiabixConsoleApplica on Exception occurred occurred
{ Remaining
class MyProgram program
{
sta c void Main(string[] args)
{
int index;
int vat = 88;
int[] a = new int(5];
320
try
{
Console.Write("Enter a number: ");
index = Convert.Toint32(Console.ReadLine());
a[index] = val;
}
catch(Excep on e)
{
Console.Write("Excep on occurred");
}
Console.Write("Remaining program");
Which of the following statements is incorrect about delegate? MCQ Delegates are reference Delegates are object Delegates are type- Only one method
321 types. oriented. safe. can be called
using a delegate.
In which of the following areas are delegates commonly used? MCQ I & II I&V I, II & III IV & V
I: Remo ng
322 II: Serializa on
III: File Input/Output
IV: Mul threading
V: Event handling
Which of the following is the necessary condition for implementing MCQ Class declaration Inheritance Run-time Exceptions
323
delegates? Polymorphism
Which of the following statements are correct about a delegate? MCQ I & II I, II & III II, III & IV All of the listed
options
I: Inheritance is a prerequisite for using delegates.
324 II: Delegates are type-safe.
III: Delegates provide wrappers for func on pointers.
IV: The declaration of a delegate must match the signature of the method
that we intend to call using it.
Which of the following statements are correct about delegates? MCQ Delegates cannot be Delegates cannot be If signatures of two Delegates cannot
used to call a static used to call methods are same be used to call an
method of a class. procedures that they can be called instance function.
325 receive variable through the same Delegates cannot
number of delegate object. be used to call an
arguments. instance
subroutine.
Which of the following are the correct ways to declare a delegate for MCQ delegate d(int i, Single delegate void d(int, delegate int d(int i, delegate void (int
calling the function func() defined in the sample class given below? j); Single); Single j); i, Single j);
class Sample
{
326 public int func(int i, Single j)
{
/* Add code here. */
}
}
Suppose on pushing a button an object is to be notified, but it is not known MCQ Attribute Delegate Namespace Interface
until runtime which object should be notified. Which of the following
327
programming constructs should be used to implement this idea?
Which of the following statements is incorrect about a delegate? MCQ A single delegate can Delegates can be Delegate is a value Delegates are
invoke more than one shared. type. type-safe
328
method. wrappers for
function pointers.
Suppose a Generic class called S ortObjects is to be made capable of MCQ Namespace Interface Encapsulation Delegate
sorting objects of any type (Integer, Single, Byte etc.). Which of the
329
following programming constructs should be used to implement the
comparison function?
With which of the following can the ref keyword be used? MCQ 1&4 3&4 2&3&4 1&2&3
1.Sta c data
330 2.Instance data
3.Sta c func on/subrou ne
4.Instance function/subroutine
Which all statements are true about En ty Framework? MCQ 2&3 1&4 2&3&4 1&3
1.It takes care of rela onal databases
2.It takes care of impedance mismatch
331
3.It allows applications to be written against conceptual models and not
directly against the database
4.It takes care of memory mismatch
What all services does an En ty Framework provide? MCQ 1&3&5 2&3&4&5 1&4 1&2&4 1&2&4&5
1.Query services
2.ClientView services
332
3.Remo ng Services
4.Persistence services
5.Object services
The Entity Framework divides the data model into three separate models MCQ 2&3 1&3 2&4 1&3&4
which are those?
1.Conceptual
333
2.Rela onal
3.Logical
4.Physical
MCQ 1&2&3&4 1&2&4&5 1&3&4 2&5 1&3&4&5
In what ways en es are like objects?
1.En es have a known type
334 2.En es have proper es, and these proper es can hold scalar values
3.En ty proper es can hold references to other en es
4.Each en ty has a dis nct iden ty
5.Entities have primary keys that uniquely identify the entity
MCQ 1&2 1&4 2&3 1&2&4
How can LINQ queries be performed against mul ple tables in a DataSet?
345 1.Cannot be performed
2.By using Join operator
3.By using GroupBy operator
4.By using GroupJoin operator
MCQ 2&4 1&4 2&3 1&3
How can you load data into a DataSet so that it can be queried using LINQ?
1.By using DataAdapter Class
346
2.By using LINQ to DataSet
3.By Using LINQ to SQL
4.By using LINQ to XML
What are the forms in which LINQ queries can be created? MCQ 1&2 2&3 3&4 1&3
1.Rela onal data syntax
347 2.Intrinsic data syntax
3.Query-Expression syntax
4.Method-based query syntax
On which datasources do LINQ queries work? MCQ 3&4 1&2 1&3 2&4
1.Datasources that implement IEnumerable<T> interface
348 2.Datasources that implement IQueryable interface
3.Datasources that implement IQuery interface
4.Datasources that implement IAccess interface
DataSet ds = new DataSet(); MCQ 2&3 1&4 1&3&4 1&4
ds.Locale = CultureInfo.InvariantCulture;
FillDataSet(ds);
var query =
from order in orders.AsEnumerable()
join detail in details.AsEnumerable()
on order.Field<int>("SalesOrderID") equals
349
detail.Field<int>("SalesOrderID")
where order.Field<bool>("OnlineOrderFlag") == true
&& order.Field<DateTime>("OrderDate").Month == 8
select new
{
SalesOrderID =
order.Field<int>("SalesOrderID"),
SalesOrderDetailID =
detail.Field<int>("SalesOrderDetailID"),
OrderDate =
order.Field<DateTime>("OrderDate"),
MCQ 2&3 1&4 3&1 2&4
357 How are HTML server control classes categorized in the HTML hierarchy?
1.The classes that mimic the HTML <ref> tag
2.The classes that mimic the HTML <input> tag
3.The classes that may act as container classes
4.The HtmlImage class
MCQ RequiredFieldValidator RangeValidator CompareValidator CustomValidator
358
Which control can be used to ensure that the user does not miss an entry?
What does the following code denote? MCQ Usage of Usage of Usage of Usage of
PHONENO: <asp:TextBox id="txtPinCode" RequiredFieldValidator RangeValidator RegularExpressionVa CustomValidator
runat="SERVER"></asp:TextBox> lidator
<asp:RegularExpressionValidator
359 id="txtPhoneNumber_valida on" runat="SERVER"
ControlToValidate="txtPhoneNumber"
ErrorMessage="Enter a valid Phone number with area code"
Valida onExpression="\d{4}(-\d{8})?">
</asp:RegularExpressionValidator>
MCQ Usage of Usage of Usage of Usage of
RequiredFieldValidator RangeValidator RegularExpressionVa ComparisonValida
What does the following code denote? lidator tor
<table>
<tr>
<td>
<asp:Textbox id="txtAge" runat="server"></asp:Textbox>
</td>
<td>
360
<asp:CompareValidator id="CompareFieldValidator1" runat="server"
ForeColor="Blue"
ControlToValidate="txtAge"
ValueToCompare="0"
Type="Integer"
Operator="GreaterThanEqual"
ErrorMessage="Please enter a whole number zero or greater.">
</asp:CompareValidator >
</td>
</tr>
</table>
MCQ Usage of Usage of Usage of Usage of
What does the following code denote? RequiredFieldValidator RangeValidator RegularExpressionVa CustomValidator
<asp:Textbox id="txtFirstName" runat="server"></asp:Textbox> lidator
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server"
361 ControlToValidate="txtFirstName"
ErrorMessage="First name is a required field."
ForeColor="Blue">
</asp:RequiredFieldValidator>
Which statements are true about themes? MCQ 1&2&3 1&3&4 2&4 3&4
1.Themes enable you to apply consistent style to pages in your website
2.Themes can be used to control naviga on order between pages
3.Themes can be used to control the appearance of HTML elements
362
4.Themes can be used to control the appearance of ASP.NET controls
How are themes different from master pages? MCQ Themes allow you to Themes allow you to Themes allow you to Themes & Master
share content across control the share data across pages are both
363
multiple pages in a web appearance of multiple pages in a same
site contents web site
Please choose statements that are true about crea ng themes. MCQ 2&3 1&2&4 1&4 3&4
1.Themes are created by adding a folder in App_Themes folder
2.Themes are created by adding a folder in App_Directory folder
364 3.Each folder that you add to the App_Directory folder represents a
different Theme
4.Each folder that you add to the App_Themes folder represents a
different Theme
Which statements are true about Skins to Themes? MCQ 1&3 1&2&4 2&3&4 2&4
1.A theme can contain only one skin
2.A theme can contain one or more Skin files
365 3.A skin enables you to modify any of the events of an ASP.NET control
that get triggered on certain condi ons
4.A skin enables you to modify any of the properties of an ASP.NET control
that have an effect on its appearance
What does the following code snippet denote? MCQ Usage of a Master page Usage of a Named Usage of a Default Usage of a
<asp:TextBox skin skin stylesheet
SkinID=”DashedTextBox”
366
BorderStyle=”Dashed”
BorderWidth=”5px”
Runat=”Server” />
How can you override Skin properties? MCQ By applying a Theme to By applying a Theme By applying a Theme By applying a
a page with the to a page with the to a page with the Theme to a page
367
MasterPage attribute Skin attribute StyleSheetTheme with the Theme
attribute attribute
How can you prevent a skin from being applied to a particular control? MCQ By setting By setting By setting By setting
EnableTheming EnableTheming DisableTheming DisableTheming
368 property to property to false property to true property to false
true
What does the following lis ng denote? MCQ Registring a Registring a theme in Registring a Registring a Skin
<configura on> StyleSheetTheme in web.config MasterPage in in web.config
<system.web> web.config web.config
369
<pages theme=”Website” />
</system.web>
</configuration>
How can you expose properties & methods from a Master Page so that MCQ By declaring them as By declaring them as By declaring them as You cannot
they are modifiable from a particular content page? protected private public expose properties
& methods from a
Master Page so
370
that they are
modifiable from a
particular content
page
What are the similari es between UserControl class & Page class? MCQ 2&4 1&2&3 3&4 1&3
1.Both derive from the base TemplateControl class
371 2.Both derive from the base Control class
3.Both share same property, methods & events
4.Both share same interfaces
What is the significance of the @ Register directive in a ASP.NET web MCQ The directive is used to The directive is used The directive is used The directive is
372
page? register a web page to register a user to register an used to register a
control application web site
What a ributes does the @ Register contain? MCQ 1&2&4 3&4 1&2 2&3&4
1.TagPrefix
373 2.TagName
3.Cntrl
4.Src
What are the differences between a user control & a page? MCQ 1&2&3&4 1&2&5 3&5 2&4 1&2&4&5
1.The file name extension for the user control is .ascx
2.The user control contains an @ Control directive that defines
configura on and other proper es
374 3.The user control contains an @ Page directive that defines the page in
which it is embedded
4.The user controls cannot run as stand-alone file
5.The user control does not have html, body, or form elements in it. These
elements must be in the hosting page
Which attribute of the @ Register directive indicates the name space you MCQ TagPrefix TagName Cntrl Src
375 want to associate with the user control for the current page?
Which are the different mechanisms of setting a property of a user control MCQ 2&4 1&3 1&3&4 1&2&4
once it is exposed?
1.The property can be set declara vely
376
2.The property can be set in a config file
3.The property can be set programma cally
4.The property can be set dynamically
Which attribute of the @ Register directive indicates the name you want MCQ TagPrefix TagName Cntrl Src
377
to associate with the user control for the current page?
Which all are the different mechanism of registering a user control? MCQ 2&3 1&3&4 1&4 1&2&3
1.By using a @ Register direc ve in the web page
2.By using @ RegisterControl direc ve in the web page
378
3.By manually installing the user control
4.By registering the user control in the web.config file
How do you make the events raised by child controls in a user control MCQ By raising the events of By writing a delegate By declaring the By defining events
available to the host page? each child control in the host page event public for the user
control & raising
379 them so that the
host page is
notified of the
event
Which attribute of the @ Register directive indicates the virtual path to the MCQ TagPrefix TagName Cntrl Src
380
user control?
MCQ 2&3 1&4 2&4 1&2&3
Which all controls in ASP.NET can be used to display text in a page?
1.ListBox
381 2.Label
3.Literal
4.CheckBoxList
What statements are applicable to Panel control? MCQ 2&3&4 1&3&4 1&3 1&2
1.It can be used as a container to other controls
382 2.It is rendered as an HTML <span> element
3.It is rendered as an HTML <div> element
4.It displays a link to another page
Iden fy the statements that are applicable to the Literal control. MCQ 1&3 2&4 1&3&4 1&2&4
1.Literal control does not support CssClass
383 2.Literal control does not support BackColor
3.Contents of a Literal control are contained in a <span> tag
4.Contents of a Literal control are not contained in a <span> tag
Which are the different values that TextMode property of a TextBox MCQ 1&4 1&2&5 2&4 4&5 2&3&5
control can have?
1.ReadOnly
384 2.SingleLine
3.Mul Line
4.AutoFill
5.Password
MCQ Check event is raised at Check event is raised CheckChanged event CheckChanged
the client side on the server is raised at the client event is raised on
385
side the server
What happens when a Check box is checked or unchecked by the user?
Which controls can be used to submit form data to the server? MCQ 1&2&5 3&4&5 2&3&5 1&3 2&4&5
1.CheckBox
2.Bu on
386
3.Image
4.ImageBu on
5.LinkButton
Which all statements are true about OnClientClick property? MCQ 1&3&4 2&3 1&4 2&4
1.It is applicable to CheckBox control, RadioBu on controls
387 2.It is applicable to Bu on, LinkBu on & ImageBu on controls
3.It executes a Javascript at the client side on click of the control
4.It executes a server-side script on click of the control
MCQ By using the By using the By using the By using the
388 PostBackUrl property PostBack property AutoPostBack PostBackData
How can you post form data to another page? property property
Iden fy statements that are applicable to AutoPostBack a ribute. MCQ 2&3 3&4 1&2&4 1&4
1.It automa cally submits form to the server
389 2.It submits form only on click of a bu on
3.It submits form on execu on of a client script
4.Too many AutoPostBacks hamper the overall performance
Which statements are applicable to Mul View control? MCQ 2&3&4 3&4 1&2&3 1&4
1.MultiView control enables you to hide and display different areas of a
page
390
2.Mul View is useful when you need to create a tabbed page
3.Mul View control contains one or more View controls
4.You can render multiple view controls at any given time
MCQ 3&4 1&2 1&3&4 2&4
Which all languages can be used to develop a ASP.NET applica on?
1.C#
391
2.Visual Basic .NET
3.Visual Basic
4.C Language
How is ASP.NET different from ASP? MCQ 1&3 2&4 1&3&4 1&2
1.ASP.NET is Object oriented
392 2.ASP.NET is Procedure oriented
3.ASP.NET does not support VBScript
4.Scripts can be written in VBScript in ASP.NET
Can we use components developed in VB6.0 in ASP.NET? MCQ Yes; at the assembly Yes; you can use Yes; you can use You cannot use
level components VB6.0 components VB6.0 components components
developed is VB6.0 are using Runtime using COM Callable developed in
same as components Callable Wrapper Wrapper (CCW) VB6.0 in ASP.NET
393 developed in .NET, (RCW)
hence they can be used
as any other .NET
component
Can we use components developed in .NET in legacy applications like MCQ Yes; at the assembly Yes; you can use Yes; you can use.NET You cannot use
VB6.0? level components .NET components in components in components
developed is .NET are VB6.0 using Runtime VB6.0 using COM developed in.NET
same as components Callable Wrapper Callable Wrapper in VB6.0
394
developed in VB6.0, (RCW) (CCW)
hence they can be used
in VB6.0
How is the issue of DLL Hell taken care of in ASP.NET? MCQ Through versioning of Through COM Through Remoting Through usage of
.NET assemblies interop web services
395
Why are ASP.NET applications slightly slower on first load? MCQ Because .NET Because on first load Because on first load Because .NET
framework execution is ASP.NET files are ASP.NET files are loads the entire
slower compared to compiled, if converted to native application in the
396 ASP necessary, into .NET executables that are memory
page classes & then recognized by the
executed operating system &
then executed
How is POST different from GET? MCQ POST does not send any POST sends POST sends POST & GET do
information back to information information in a the same thing
397 the server embedded in the HTTP Header
URL
___________ is a numerical label assigned to each device like a computer, MCQ HTML XML URL IP Address
420 a printer etc. participating in a computer network that uses the Internet
Protocol for communication.
____________is the process of customizing your application for a given MCQ Globalization Localization Customization Culturalization
421
culture and locale.
Which two proper es of a page class have an effect on localiza on? MCQ 1&3 2&3&4 1&4 2&3
1.Culture
2.Localize
422
3.UICulture
4.Globalize
The _____________ property is used to specify which resource files are MCQ Culture Localize UICulture Globalize
423
loaded for the page.
What is the significance of Culture property of a page class? MCQ The Culture property is The Culture property The Culture property The Culture
used to specify which determines how determines how property
resource files are strings such as dates, resource files are determines the
loaded for the page numerals,and used for formatting default culture of
424 currency amounts dates, numerals,and the operating
are formatted currency amounts system
What is a Neutral culture? MCQ When you provide a When you do not When you provide When you
country/region code specify either the the culture name but provide country
425 but no culture name country/region code no country/region name & culture
or the culture name code name as US
What is referred to as Specific Culture? MCQ If you provide only a If you provide only a If you do not provide If you provide
language code but no country/region code either a language both a language
426 country/region code but no language code or a code and a
code country/region code country/region
code
Culture & UICulture properties of a page class can have different culture MCQ T F
427 values.
State True or False.
What is the effect on the currency amount values by setting the Culture MCQ Currency symbol is Currency values are Currency values are No effect on the
information? automatically placed automatically fetched from currency values
428 converted web.config file
How can you display dates with language specific month names? MCQ By modifying the By modifying the By modifying the You cannot
Culture property UICulture property web.config file display dates with
429
language specific
month names
What does the following culture name denote: en-GB? MCQ It denotes that the It denotes that the It denotes that the It denotes that
language is English & language is English & language is English & the language is
430 Country is United Country is United Country is India English & Country
Kingdom States is Global
Which are the different ways in which you can separate code & content in MCQ 1&2&3 1&2 3&4 1&3&4
ASP.NET?
1.By using code-behind files that are pre-compiled modules written in any
.NET compliant languages
431
2.By using resource files
3.By crea ng user controls
4.By moving business logic into components that can run on the server &
calling those components from server-side
MCQ 2&3 1&4 1&2&4 3&4
What are the advantages of partitioning an ASP.NET web page?
1.Individual members of the development team can work on separate,
individually-owned parts
432
2.Developers can work within environments that are familiar
3.Database administrators can create database related tasks
independently
4.Web Authors can use HTML development tools to build the interface
Which are the basic steps for separa ng a ASP.NET web page? MCQ 1&2&3&5 1&2&4 3&4 2&5 1&3&4&5
1.Create a file for user interface
2.Create a file for database
433
3.Create a file for interface logic
4.Use page direc ve to link the two files
5.Call procedures in the code-behind page
Which are the basic steps to use a user control? MCQ 2&4 3&4 1&3&4 1&2
1.Include a User control in another ASP.NET page using the register
direc ve
434
2.Upload the user control in IIS root
3.Insert the user control like a server control
4.Set properties of the user control
What are the advantages of using .NET components over components MCQ 2&3 1&4 1&3&4 1&2
developed in older technologies?
1.No registra on required
435
2.No restart required
3.Components cannot be deleted
4.multiple version of components can exist
MCQ Compiler omits the Compiler generates Compiler will Compiler will
code an error consider the generate the
implementing partial defining partial
436
as a normal method
What will happen if there is an implementing partial without a defining and compile the
partial in a partial method? code
Which all statements are true about Par al Methods? MCQ 1&3 2&3 2&4 1&4
1.Par al methods must be members of par al types
2.Par al methods must be in the same file
437
3.There are two parts to partial methods: a defining part and
implementa on part
4.Partial methods have only the implementation part
// File-A MCQ 1&3 3&4 1&2&3 2&4
public par al struct CurrencyDetails
{
private double amount;
public double Amount
{
get
{
return amount;
}
set
438
{
amount = value;
AmountChanged(amount);
}
}
// File-B
MCQ 1&3&4 2&3 2&4 1&3
What are the advantages of par al classes?
1.When mul ple deployments are required
2.When working on large projects, spreading a class over separate files
439
allows mul ple programmers to work on it simultaneously
3.When mul ple versions of assembly are required
4.When working with automatically generated source, code can be added
to the class without having to recreate the source file
MCQ 1&2&3 2&3&4 1&3 2&4
What are the rules to follow when working with par al class defini ons?
1.Par al defini ons must span mul ple modules
2.All partial-type definitions meant to be parts of the same type must be
modified with par al
440
3.The partial modifier can only appear immediately before the keywords
class, struct, or interface
4.All partial-type definitions meant to be parts of the same type must be
defined in the same assembly and the same module (.exe or .dll file).
Partial definitions cannot span multiple modules
Which are the different security mechanisms that are included in the MCQ 1&3&5 1&2&3&4 2&3&4 4&5 1&2&3&5
ASP.NET Framework?
1.ASP.NET Authen ca on
441 2.ASP.NET Authoriza on
3.ASP.NET Membership
4.ASP.NET Encryp on
5.Role Manager
Which are the different types of authentication mechanisms that ASP.NET MCQ 1&3&4 2&3&4 1&4 2&3
framework supports?
1.Windows Authen ca on
442
2.Iden ty Authen ca on
3..NET Passport Authen ca on
4.Forms Authentication
Iden fy the statements that are applicable to Windows authen ca on. MCQ 3&4 1&4 1&2 2&3&4
1.Users are iden fied by entries in the database
2.Users are iden fied by their Microso Windows account names
443 3.Roles correspond to Microso Windows groups
4.The responsibility of identifying users is delegated to Internet
Information Server
Which statements are true about Forms authen ca on? MCQ 2&4 1&3&4 1&3 2&3
1.Users are iden fied by a cookie
444 2.Users are iden fied by their Microso Windows account names
3.User and role informa on is stored in a custom data store
4.Roles correspond to Microsoft Windows groups
Which Membership providers are supported by ASP.NET framework? MCQ 2&4 3&4 1&2&3 2&3
1.FormsMembershipProvider
2.WindowsMembershipProvider
445
3.SqlMembershipProvider
4.ActiveDirectoryMembershipProvider
What does the SqlMembershipProvider do? MCQ Stores user information Stores user Stores user Stores user
446 in the config file information in SQL information information in
Server database resource files Active Directory
What does the following code snippet denote? MCQ It shows how the config It shows how the It shows how the It shows how the
<configura on> file is configured to use config file is config file is config file is
<connec onStrings> membership configured to use configured to use configured to use
<add name=”MyConnection” connectionString=”Data information from the membership membership membership
Source=MyServer;IntegratedSecurity= default SQL Server information from a information from information from
True;Ini al Catalog=MyDatabase”/> database database other than the active directory the IIS
</connec onStrings> the default SQL
Server database
<system.web>
<authen ca on mode=”Forms” />
447
<membership defaultProvider=”MyMembershipProvider” >
<providers>
<add
name=”MyMembershipProvider”
type=”System.Web.Security.SqlMembershipProvider”
connec onStringName=”MyConnec on” />
</providers>
</membership>
</system.web>
</configuration>
What steps should be completed if you want to use ASP.NET Membership MCQ 1&3 1&4 2&3 2&4
with Ac ve Directory Applica on Mode?
1.Create a SQLServer instance and create the required classes
2.Create an ADAM instance and create the required classes
448 3.Configure your application to use the
Ac veDirectoryMembershipProvider and connect to the ADAM instance
4.Configure your application to use the SqlMembershipProvider and
connect to the ADAM instance
What does the following code snippet denote? MCQ It shows how the config It shows how the It shows how the It shows how the
<configura on> file is configured to use config file is config file is config file is
<system.web> membership configured to use configured to use configured to
<authen ca on mode=”Forms” /> information from the membership membership create a custom
<membership defaultProvider=”OwnMembershipProvider”> default SQL Server information from a information from membership
<providers> database database other than the active directory provider
the default SQL
<add Server database
name=”OwnMembershipProvider”
type=”MembershipProvider.XmlOwnMembershipProvider”
449
dataFile=”~/App_Data/OwnMembership.xml”
requiresQues onAndAnswer=”false”
enablePasswordRetrieval=”true”
enablePasswordReset=”true”
passwordFormat=”Clear” />
</providers>
</membership>
</system.web>
</configura on>
Which Membership provider attributes can be set to determine the MCQ 1&3&4 2&4&5 1&2&5 2&3 1&4&5
password policy?
1.minRequiredPasswordLength
2.maxRequiredPasswordLength
450
3.minRequiredAlphanumericCharacters
4.minRequiredNonalphanumericCharacters
5.passwordStrengthRegularExpression
What all ac vi es happen during the Start stage of the page life cycle?
462 1.Request and Response page proper es are set
2.The page determines whether the request is a postback or a new request
3.The page_load event is called
4.The page sets the IsPostBack property
MCQ 2&4 1&2 1&3 3&4
What all activities happen during the Initialization stage of the page life
cycle?
463 1.Each control's UniqueID property is set
2.Postback data is loaded
3.A master page and themes are applied to the page
4.Control property values are restored to the values from view state
MCQ Controls are registered Control properties Control properties Control
are set to Null are loaded with properties are
information loaded with
464
recovered from information
config files recovered from
What all happens during page load? view state and
control state
How is the Postback event handling done during a page life cycle? MCQ 2&3&4 1&3 1&3&4 2&4
1.Control event handlers are called
465 2.Page Load event is triggered
3.The Validate method of all validator controls is called
4.The IsValid property of individual validator controls is set
MCQ 1&3 2&4 3&4 1&2&3
What all happens before & during the Rendering stage of the page life
466 cycle?
1.Page load event is triggered
2.View state is saved for the page and all controls
3.Control properties are loaded with information recovered from view
state and control state
4.The Render method for each control is called by the page
MCQ 2&3&4 1&2&4 2&3 1&4
Which statements are true about the unload event of the page life cycle?
1.Event is raised before the page has been fully rendered, sent to the
client, and is ready to be discarded
467
2.Event is raised after the page has been fully rendered, sent to the client,
and is ready to be discarded
3.Page proper es such as Response & Request are unloaded
4.Cleanup is performed
Which event is raised after the start stage is complete and before the MCQ PreInit Init InitComplete PreLoad
468
initialization stage begins in a page life cycle?
Which event is raised after the page loads view state for itself and all MCQ PreInit Init InitComplete PreLoad
469 controls, and after it processes postback data that is included with the
Request instance?
Which event is raised at the end of the event-handling stage of the page MCQ Init InitComplete LoadComplete Unload
470
life cycle?
How do you separate ASP.NET code from the user interface? MCQ Using ASP.NET web Using Code-Behind Using User Controls Using Custom
471
pages forms Controls
How do you implement code behind? MCQ 1&3 2&3&4 3&4 1&2
1.All the user interface related code is wri en in a .aspx file
472 2.All the user interface related code is wri en in a .cs or .vb file
3.All the business logic is wri en in a .cs or .vb file
4.All the business logic is written in a .aspx file
What does following direc ve denote? MCQ 1&3&4 2&4 1&4 2&3
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
1.It denotes that the html details of the page are in Default.aspx.cs
473
2.It denotes that the .NET code of the page is in Default.aspx.cs
3.It denotes that the language used for coding is C#
4.It denotes that C# code blocks are embedded in the html elements
In ASP.NET which class does the code behind page inherit from? MCQ System.Web.UI.Control System.Web.UI.Web System.Web.UI.Web System.Web.UI.P
474
Control Page age
What are the implications of inheriting the code-behind page from a Page MCQ 1&3&4 2&4 2&3 1&2&3
class in an ASP.NET applica on?
1.Inheriting from the Page class gives the code-behind page access to the
HTML elements in the web page
2.Inheriting from the Page class gives the code-behind page access to the
475 ASP.NET intrinsic objects, such as Request and Response
3.Inheriting from the Page class provides a framework for handling events
for controls within the ASP.NET page
4.Inheriting from the Page class provides a framework for handling
application configuration issues
What does the following code denote? MCQ It denotes a config file It denotes an aspx It denotes a code- It denotes a
<%@ Page Language="C#" Inherits="MyStuff.MyClass" %> page behind page header file
<HTML>
<body>
<form id="MyForm" runat="server">
<asp:textbox id="MyTextBox" text="Hello World"
476 runat="server"></asp:textbox>
<asp:button id="MyButton" text="Echo Input"
Onclick="MyBu on_Click" runat="server"></asp:bu on>
<asp:label id="MyLabel" runat="server" />
</form>
</body>
</HTML>
What does the following code denote? MCQ It denotes a user It denotes an aspx It denotes a code- It denotes a
using System; control page behind page header file
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MyStuff
{
public class MyClass : Page
{
477
protected System.Web.UI.WebControls.Label MyLabel;
protected System.Web.UI.WebControls.Bu on MyBu on;
protected System.Web.UI.WebControls.TextBox MyTextBox;
What does the Accept_Language header contain? MCQ Contains information of Contains information Contains a list of the Contains a list of
489 the default language of the basic language user’s preferred all the languages
languages
The value of the Culture property automatically has an effect on the MCQ T F
490
rendering behavior of ASP.NET controls; State True or False.
MCQ Enables you to retrieve Enables you to Enables you to Enables you to
an unsorted hashtable retrieve a sorted retrieve an unsorted retrieve a sorted
491 of cultures of type hashtable of cultures array of cultures of array of cultures
CultureInfo of type CultureInfo type CultureInfo of type
What does the GetCultures method of the CultureInfo class do? CultureInfo
MCQ 1&2&3 1&4 3&4 2&3
Which statements are true about App_LocalResources folder?
1.All the resource files to be associated with a page must be added to
App_LocalResources folder
492 2.App_LocalResources folder must contain the applica on config file
3.The application config file must contain details of the
App_LocalResources folder
4.App_LocalResources folder is created in the same folder as the page you
want to localize
MCQ 2&3&4 1&2&3 3&4 2&4
Identify from the list the localization resource files that can be associated
with a page called MyPage.aspx which is constructed for US English.
493 1.MyPage.resx
2.MyPage.aspx.resx
3.MyPage.aspx.en-US.resx
4.MyPage.aspx.en.resx
What types of resource files does ASP.NET framework support? MCQ 2&3&4 1&2 3&4 1&4
1.Local
494 2.Private
3.Protected
4.Global
MCQ When a user requests When a user When a user When a user
the page, a resource requests the page, a requests the page, a
requests the
file that matches the resource file that resource file thatpage, a resource
settings in the config matches the Culture matches the registry
file that matches
495 file is loaded property of the page settings is loadedthe user’s
automatically directive is loaded automatically preferred
automatically browser language
What happens when the value of UICulture attribute in the <%@ Page > is loaded
directive is set to value auto? automatically
MCQ By using explicit By using implicit By using web.config You cannot
localization expression localization file localize multiple
496 expression control properties
with one resource
How do you localize multiple control properties with one resource key? key
What does the meta:resourcekey property in the code denote? MCQ It represents a local It represents a value It represents a It represents the
<asp:Bu on resource file name from a local resource resource key in a control name
id=”btnSubmit” file local resource file
meta:resourceKey=”btnSubmit”
497
Text=”Save Data”
ToolTip=”Click to Save data”
OnClick=”btnSubmit_Click”
Runat=”server” />
MCQ By using the By using the By using the By using the
498 GetResource method GetObject method GetResourceObject GetLocalResource
How do you retrieve Local resources programmatically? method Object method
MCQ 1&4 2&3 1&2 3&4
Which statements are true about App_GlobalResources folder?
1.All the resource files to be associated with the entire application must be
added to App_GlobalResources folder
499 2.App_GlobalResources folder must contain the applica on config file
3.The application config file must contain details of the
App_GlobalResources folder
4.App_GlobalResources folder must be located in the root of the
application
MCQ By using the By using the By using the By using the
500 GetResource method GetObject method GetGlobalResourceO GetLocalResource
How can you retrieve Global resources programmatically? bject method Object method
____________is the process of customizing your application for a given MCQ Globalization Localization Customization Culturalization
501
culture and locale.
MCQ 2&4 1&2 3&4 1&3
Which two proper es of a page class have an effect on localiza on?
1.Culture
502
2.Localize
3.UICulture
4.Globalize
The _____________ property is used to specify which resource files are MCQ Culture Localize UICulture Globalize
503
loaded for the page.
What is the significance of Culture property of a page class? MCQ The Culture property is The Culture property The Culture property The Culture
used to specify which determines how determines how property
resource files are strings such as dates, resource files are determines the
loaded for the page numerals,and used for formatting default culture of
504
currency amounts dates, numerals,and the operating
are formatted currency amounts system
What is a Neutral culture? MCQ When you provide a When you do not When you provide When you
country/region code specify either the the culture name but provide country
505 but no culture name country/region code no country/region name & culture
or the culture name code name as US
What is referred to as Specific Culture? MCQ If you provide only a If you provide only a If you do not provide If you provide
language code but no country/region code either a language both a language
506 country/region code but no language code or a code and a
code country/region code country/region
code
Culture & UICulture properties of a page class can have different culture MCQ T F
507
values. State True or False.
What is the effect on the currency amount values by setting the Culture MCQ Currency symbol is Currency values are Currency values are No effect on the
508 information? automatically placed automatically fetched from currency values
converted web.config file
How can you display dates with language specific month names? MCQ By modifying the By modifying the By modifying the You cannot
Culture property UICulture property web.config file display dates with
509
language specific
month names
How does SOAP enable crea on & usage of Web services? MCQ 1&2&3 1&3&4 2&3 1&4
1.Enables messaging over HTTP
2.Uses proprietary means of describing data
510
3.Uses standard means of describing data
4.Provides a robust mechanism to send data & structure over the web
Which are the triggers supported by UpdatePanel control? MCQ 1&3 1&2&4 2&4 3&4
1.AsyncTrigger
534 2.AsyncPostBackTrigger
3.PostBack
4.PostBackTrigger
MCQ By using AsyncTrigger By using By using By using Nested
535 How do you control refresh of only a certain portion of the page during an AsyncPostBackTrigge ScriptManager UpdatePanel
asynchronous postback? r control Controls
Which method enables you to add an inline JavaScript right after the MCQ RegisterArrayDeclaratio RegisterClientScriptB RegisterClientScriptI RegisterClientScri
536
opening <form> tag? n lock nclude ptResource
Which method enables you to add a reference to a JavaScript file MCQ RegisterArrayDeclaratio RegisterClientScriptB RegisterClientScriptI RegisterClientScri
537
embedded in an assembly? n lock nclude ptResource
How can you explicitly abort a previous asynchronous postback? MCQ By using By using By using By using
PageRequestManager PageRequestManage PageRequestManage PageRequestMan
abortPostBack() r r ager
538
method abortAsyncPostBack( abortPreviousPostBa abortPreviousAsy
) method ck() method ncPostBack()
method
Which control lets you display a progress indicator while an UpdatePanel is MCQ ScriptManager control UpdatePanel control UpdateProgress UpdateStatus
539
updating its content? control control
What does the TargetControlID property of the DragPanel extender MCQ It contains the ID of the It contains the ID of The ID of the control The ID of the
control contain? Panel control on which the Panel control to that the user clicks panel control that
540 the other control will drag to drag the Panel the user clicks to
be dragged control drag the child
control
How is an error handled by default during an asynchronous postback? MCQ The application crashes The web server A Javascript alert A 'Page not found'
transmits an error box appears that error is thrown
541
message displays an error
message
MCQ Animation loads when Animation plays Animation stops Animation pauses
you hover your mouse when you hover your when you hover when you hover
542
over the target mouse over the your mouse over the your mouse over
How does the Animation control react to OnHoverOver event? target target the target
Which control enables you to display an animation while the UpdatePanel MCQ Animation UpdatePanelAnimati SlideShow DropShadow
543
is performing an asynchronous postback on
Where is the supporting code for client-side Microsoft AJAX Framework MCQ Microsoft.js Ajax.js JavaScript.js MicrosoftAjax.js
544
present?
Which file contains the JavaScript code for supporting the UpdatePanel MCQ Javascript.js Ajax.js MicrosoftAjaxWebFo MicrosoftAjax.js
545
control? rms.js
MCQ It redirects the user to It redirects the user It redirects the user It redirects the
login page on to an error page on to a functional page user to the logout
546 unsuccessful login unsuccessful login after successful page after
What does the redirectUrl parameter of AuthenticationService.Login attempt attempt authentication unsuccessful
method do? authentication
To use Role service, you need to do which of the folllowing 2 configuration MCQ 1&3 2&4 1&4 2&3
changes to your web.config?
1.enabling the role service by adding <roleService> element to the
<system.web.extensions> sec on of your web.config file
2.enabling the role service by adding <role> element to the
547
<system.web.extensions> sec on of your web.config file
3.enabling the roles by adding <roleManager enabled=”true” /> element
to the <system.web> sec on of your web.config file
4.enabling the roles by adding <role enabled=”true” /> element to the
<system.web> section of your web.config file
MCQ It shows user profiles It enables you to It enables you to It enables you to
load information store information display
associated with a associated with a information
548 user across multiple user across multiple associated with a
visits to a web visits to a web user across
application application multiple visits to a
What does the Profile service do? web application
Which mechanism did HTML use to facilitate exchange of information & MCQ Hypertexts Hyperjoins Hyperlinks Hyperreference
549
documents between the researchers?
What is the significance of Document Type Defini on (DTD)? MCQ 1&2&3&4 2&3&4&5 1&2&4 3&5 1&2&4&5
1.Is a set of markup declara ons that define a document type
2.It's syntax declares precisely which elements and references may appear
where in the document
550 3.It declares precisely the programming logic used for each element in the
document
4.It declares en es which may be used in the HTML document
5.It declares what the contents and attributes are for each element
Which tag is designed to be used for putting in the top banner of a MCQ <banner> <heading> <title> <name>
551
window?
What are your observa ons on the following example? MCQ 1&3&4&5 1&3&4 2&4 1&2&3 3&4&5
< tle>Sample</ tle>
<h1>Chocolate</h1>
Chocolate is made up of
<a href=WhatIs.html>cocoa</a> and milk
552
1.It is an example of HTML
2.It is an example of HTTP
3.It sets the tle of the page
4.It has an anchor link
5.It has a value reference
Which mechanism was introduced in HTML 4.0 to define the presentation MCQ Headers XML Documents Cascading Style Presentation
553
of HTML pages? sheets Manager
Please select all the answers that are applicable to HTML MCQ 2&3&4&5 1&2&3&4 1&3&5 2&3&4 1&2&5
1.Stands for Hyper Text Management Language
2.Stands for Hyper Text Markup Language
554
3.Authoring language to create documents on the world wide web
4.Defines the structure & layout of a web page
5.Has Tags with attributes
What are the features of Standard Generalized Mark-up Language (SGML)? MCQ 2&4 1&3 1&3&4 1&2&4
1.It is a method for marking up text into structural units like headings,
paragraphs, list items etc.
2.Can be implemented on any computer
555 3.The language is dependent on the formatter (browser) which actually
displays the text on the screen
4.The language is independent of the formatter (browser) which actually
displays the text on the screen
Which statements are true about HyperText Transfer Protocol (HTTP)? MCQ 2&3&4 1&2&4&5 1&3 2&5 1&2&4
1.Is the founda on of data communica on for the World Wide Web
2.Is a networking protocol for distributed, collaborative, hypermedia
informa on systems
3.Is a networking protocol for monolithic applica ons
556 4.The client submits an HTTP request message to the server & the server
returns a response message to the client
5.The server submits a request to the client & the client returns a response
message to the server
What is the significance of Document Type Definition (DTD)? Please select MCQ 1&2&3&4 1&3&4 2&5 1&2&4&5 3&4&5
all the relevant op ons?
1.Is a set of markup declara ons that define a document type
2.It's syntax declares precisely which elements and references may appear
where in the document
557
3.It declares precisely the programming logic used for each element in the
document
4.It declares en es which may be used in the HTML document
5.It declares what the contents and attributes are for each element
Which of the tags from the list were inherited from SGML into HTML? MCQ 1&2&4 1&2&3 2&3&4 3&4
1.a
2. tle
558
3.p
4.ol
What are your observa ons on the following code? MCQ 1&2&4 2&3 3&4 1&3
<SCRIPT LANGUAGE=”JavaScript”>
<!--
//script statement(s) here
...
// -->
559
</SCRIPT>
1.The code will let old browsers to execute java script
2.Old browsers will ignore the java script
3.New browsers will execute the java script ignoring the comment tags
4.New browsers will ignore the java script
What is a Document object with respect to HTML? MCQ Each Javascript The object which Each HTML Each logical Form
represents a document represents the document that gets element in a
object content area of the loaded into a HTML window
browser window window is a represents a
560
where HTML document object document object
documents appear is
a document object
What are Form control elements? MCQ 1&3 2&4 1&2&4 3&4
1.They represent all the elements defined in a form object
2.They represent all the elements defined in a control object
561
3.Each element in the containing object is a separate object
4.All the elements in the containing object are grouped together as a
separate object
What does the following example denote? MCQ 1&2&3 3&4 1&3 2&4
var myAge = 25
1.A constant is declared
562
2.A variable is declared
3.A constant is ini alized
4.A variable is initialized
How do you concatenate two strings? MCQ Using the & operator Using the + operator Using the && Using the ++
563
operator operator
Which of the following are comparison operators? MCQ 1&2&4&5 1&2&3 3&4 1&4 1&3&4&5
1.==
2.!
564
3.!=
4.>
5.<=
What is the correct syntax for a repeat loop? optional values, if any, are MCQ for ([initial expression]; for (initial for (initial for ([initial
mentioned in [] brackets. [condition]; [update expression; expression; expression];
expression]) { condition; [update condition; update condition;
statement[s] inside expression]) { expression) { [update
565
loop statement[s] inside statement[s] inside expression]) {
} loop loop statement[s]
} } inside loop
}
What are your observa ons on the following code? MCQ 1&2&4 2&3 3&4 1&4
<html>
<head>
<script language=”JavaScript”>
func on showMsg(msg) {
alert(“Following message was sent: “ + msg)
}
</SCRIPT>
</head>
<body>
566
<form>
<input type=”bu on” value=”Click to Vote”
onClick=”showMsg (‘I want world peace’)”>
</form>
</body>
</html>
1.A func on is called from an assembly
2.A func on is called from an event handler
3.A parameter is passed to the func on
4.The function returns a string value
What will be the output of the following code? MCQ Tracy Flynn Owns a John Brown Owns a Tracy Flynn Owns a John Brown Owns
<html> Audi BMW Audi a BMW
<head> John Brown Owns a Tracy Flynn Owns a Tracy Flynn Owns a John Brown Owns
<script language=”Javascript”> BMW Audi Audi a BMW
var personName = “John Brown”
var carName = “BMW”
func on demo() {
var personName = “Tracy Flynn”
var carName="Audi"
<body>
<script language=”Javascript”>
demo() // runs as document loads
document.write(personName + “ Owns a “ + carName + “.”)
</script>
</body>
</html>
What does the following code snippet do? MCQ 2&3&5 1&2&4&5 1&4 1&3&5 2&3&4
What does the following code snippet do? MCQ It styles all the It styles all the It styles all the It styles all the
[ tle] elements with the title elements with the elements within the elements for title
581 { attribute title id title class initializer
color:blue;
}
How can you define an image with clickable areas? MCQ Using <image> tag Using <object> tag Using <map> tag Using <embed>
582
tag
How can you play a background sound when the page loads? MCQ Using <sound> tag Using <bgsound> tag Using the Using an attribute
583
<pagesound> tag of the <page> tag
What is the significance of <fieldset> element? MCQ 1&3 2&4 1&2 3&4
1.The <fieldset> element groups thema cally related controls and labels
2.The <fieldset> element inserts fields in pages
584
3.The usage of this element makes documents more accessible
4.The usage of this element makes documents more scalable
How can you play a background sound when the page loads? MCQ Using <sound> tag Using <bgsound> tag Using the Using an attribute
585
<pagesound> tag of the <page> tag
What does the following example denote? MCQ 3&4 2&3 1&2 1&4
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
586
</ol>
1.Usage of ordered list tag for an ordered numeric list
2.Usage of unordered list tag for an unordered list
3.Usage of ordered paragraph tag
4.Usage of list item tag to list the items
Which all statements are true about the <blockquote> tag? MCQ 3&4 1&2&3 1&3&4 2&4
1.It defines a long quota on
2.It defines paragraph quota on
587
3.browser inserts white space before and a er a blockquote element
4.browser inserts margins for the blockquote element
How do you bind a label with an input element? MCQ The for attribute of the The id attribute of The bind attribute of A label cannot be
<label> tag should be the <label> tag the <label> tag bound with an
588 equal to the id attribute should be equal to should be equal to input element
of the related element the for attribute of the id attribute of
the related element the related element
What are your observa ons on the following code? MCQ 2&4 1&3 3&4 1&2&3
<select>
<op on value="volkeswagen">VolkesWagen</op on>
<op on value="mercedes">Mercedes</op on>
<op on value="BMW">BMW</op on>
<op on value="audi">Audi</op on>
589 </select>
1.The <select> tag is used to create a drop-down list
2.The <select> tag is used to create a display list
3.The <option> tags inside the select element define the available options
in the list
4.The <option> tags inside the select element displays a option-button list
What is the significance of the <area> tag? MCQ 1&2&3 3&4 2&3 2&4
1.The <area> tag defines an area inside a form
590 2.The <area> tag defines an area inside an image-map
3.The <area> tag is always nested inside a <form> tag
4.The <area> tag is always nested inside a <map> tag
Which are the different types of bu ons that can be used in HTML Forms? MCQ 1&2&3 1&4 1&3&4 2&3
1.Submit bu ons
2.Control bu ons
591
3.Reset bu ons
4.Push buttons
Which statements are true about Checkboxes? MCQ 2&4&5 2&3&4 1&3&4 1&2&5 1&5
1.Checkboxes are on/off switches that are used to check the validity of
controls
2.Checkboxes are on/off switches that may be toggled by the user
592
3.A switch is "on" when the control element's checked a ribute is set
4.The INPUT element is used to create a checkbox control
5.The Fieldset element is used to create a checkbox control
What happens if none of the <input> elements of a set of radio buttons is MCQ None of the radio Last radio button is First radio button is All the radio
set to CHECKED? buttons are checked checked by default checked by default buttons are
593
checked by
default
Which all of the following can be categorized as Form control types MCQ 1&3&4 2&4&5 1&2&3 3&5 1&2&4
supported by HTML?
1.bu ons
594 2.Forms
3.Menus
4.hidden controls
5.Image
Which elements are used to create a menu? MCQ 2&3 1&2&4&5 1&2&3&4 4&5 1&4&5
1.select
2.menu
595
3.list
4.op on
5.optgroup
Which controls can be used to input text? MCQ 1&4 2&3&4 1&2&3 2&3
1.textbox
596 2.input
3.textarea
4.inputbox
How is textarea different from input element? MCQ 2&4 1&3&4 1&4 2&3
1.The input element creates a single-line input control
597 2.The input element creates a mul -line input control
3.The textarea element creates a single-line input control
4.The textarea element creates a multi-line input control
Which statements are true about file select control? MCQ 1&3 1&4 3&4 2&3&4
1.It allows the user to select files so that their contents may be submitted
with a form
598
2.It allows the user to select & load files on the form
3.The frameset element is used to create a file select control
4.The input element is used to create a file select control
What is the significance of hidden controls? Please choose all the relevant MCQ 2&4&5 1&2 3&4 1&3&5 1&2&3&5
op ons
1.They are controls that are not rendered but whose values are submitted
with a form
2.They are controls that are rendered but whose values are not submitted
599 with a form
3.This control type is used to store information between client/server
exchanges that would otherwise be lost due to the stateless nature of
HTTP
4.The frameset element is used to create a hidden control
5.The input element is used to create a hidden control