Advanced Web Programming MCQs - 7 | 200+ MCQ Questions with Answers


151) Which of the following gives the number of catch blocks that can be defined for a single try block:

a) one
b) two
c) three
d) The try block can have any number of catch blocks.

Ans: d

152) Which of the following statements applies to the situation where Exception is not handled in the program:

a) The Compiler will not allow the program to run the code.
b) CLR will terminate the program execution at the point where it encounters an exception.
c) CLR will not show any output. However, the code will execute successfully.
d) The Code executes successfully, and an error message gets printed.

Ans: b

153) Which of these keywords must be used to monitor exceptions?

a) try
b) catch
c) finally
d) else

Ans: a

154) Select the correct statement about an Exception?

a) It occurs during loading of program
b) It occurs during Just-In-Time compilation
c) It occurs at run time
d) All of the mentioned

Ans: c

155) Which of these keywords is not a part of exception handling?

a) try
b) catch
c) thrown
d) finally

Ans: c

156) In C#.NET if we do not catch the exception thrown at runtime then which of the following will catch it?

a) compiler
b) CLR
c) linker
d) loader

Ans: b

157) Which of the following is the Object Oriented way of handling run-time errors?

a) onError
b) Exception
c) Errorcode
d) Heresult

Ans: b

158) In C#.NET, an exception is?

a) Compile time error
b) logical error
c) runtime error
d) syntax error

Ans: c

159) There are following statements are given below, which is correct about catch block in C#.NET?

a) catch not supported in .net
b) The catch block is used to catch on number related exceptions
c) The catch block executes at least once during program execution
d) The catch block is used to catch all types of exceptions that occurred in a try block, depends upon its exception class

Ans: d

160) There are following statements are given below, which is correct about throw in C#.NET

a) The throw keyword is not supported in C#.NET
b) The throw keyword is used to throw an exception object programmatically
c) The throw keyword is not used to throw an exception object programmatically
d) The throw keyword is used in older versions of the .NET framework

Ans: b

161) superclass of all types of exceptions classes.

a) DivideByzero
b) Exceptionclass
c) Exception
d) IndexError

Ans: c

162) what are not state management techniques

a) session
b) application
c) view
d) sessionless

Ans: d

163) Information store in application state is available

a) on same page
b) every page
c) everypage of website
d) on alternate page

Ans: c

164) which all are Server side state management technique

a) view
b) session
c) cookies
d) QueryString

Ans: b

165) what is inner Exception

a) Exception inside Exception
b) Exception outside Exception
c) method of exception
d) property of Exception

Ans: d

166) ___________ uses a hidden field that ASP.NET automatically inserts in the final, rendered HTML of a web page.

a) Caption
b) View state
c) Button state
d) Application State

Ans: b

167) The ________ is a dictionary collection, which means every item is stored in a separate “slot” using a unique string name.

a) StateBag
b) Variable
c) Datatype
d) View

Ans: a

168) ASP.NET uses a _______ to make sure your view-state information can’t be altered without your knowledge.

a) view code
b) app code
c) password
d) hash code

Ans: d

169) A ________ postback is a technique that extends the postback mechanism.

a) pageing
b) Cookies
c) URL encoding
d) cross-page

Ans: d

170) The _______ is the portion of the URL after the question mark.

a) string
b) URL encoding
c) query string
d) app string

Ans: c

171) If your view state contains some information you want to keep secret, you can _____ viewstate encryption.

a) enable
b) mute
c) view
d) disable

Ans: a

172) ________ are small files that are created in the web browser’s memory or on the client’s hard drive.

a) Cookies
b) session
c) variable
d) string

Ans: a

173) __________ allows you to store any type of data in memory on the server.

a) Pageing
b) Cookies
c) Session-state
d) StateBag

Ans: c

174) ___________ Provides a string with the unique session identifier for the current client.

a) Application
b) Cookies
c) Sessionit
d) SessionID

Ans: d

175) ___________  removes all the session items but doesn’t change the current session identifier.

a) undo()
b) Commit()
c) Cancel()
d) Clear()

Ans: d

Previous Page 7 Next