Professional Documents
Culture Documents
C ASP Net Quiz With Result
C ASP Net Quiz With Result
a) is an object of a class
b) represents an attribute of an object - correct answer
c) is a method of a class
d) a and c
3) Private Button print = new button();
a) Static
b) Private
c) Local - correct answer
d) Serial
e) b and d
8) Defining two methods with the same name but with different parameters is called.
a) Loading
b) Overloading - correct answer
c) Multiplexing
d) Duplexing
9) Find any errors in the following BankAccount constructor: Public int BankAccount()
{ balance = 0; }
a) Name
b) Formal parameters
c) Return type - correct answer
d) No errors
10) In the body of a method, C# uses the variable named_____to refer to the current object
whose method is being invoked.
a) call
b) this - correct answer
c) do
d) that
11) String mystring; Creates a(n)
a) Class
b) Constructor
c) Object - correct answer
d) a and b
12) An Event is
a) a Wahsington representative
b) a class that encapsulates methods - correct answer
c) a means of passing arrays into methods
d) a substitue for an inherited method
14) Is it possible to pass methods as arguments for other methods without modification.
a) True
b) False - correct answer
16) What is the proper header for a class that intends to use an interface.
a) System
b) Object - correct answer
c) Drawing
d) Console
19) The concept of composition specifies that you can.
a) True
b) False - correct answer
23) Methods that are declared abstract in the base class must show implementation at the
time of declaration.
a) True
b) False - correct answer
24) The code public class B : A { }
a) Trys
b) Catches
c) Throws - correct answer
d) a and b
28) Exception objects are derived from the class.
a) Try
b) Catch
c) Exception - correct answer
d) Event
e) System
29) An abstract class
up
a) the delaying of a thread until there is sufficient memory and work to keep it
b) making every thread start and end at the same time
c) make each thread do the same thing
d) have each thread start at the same time but not necessarily finish together
e) wait until the required resources, that are used by other threads become
available - correct answer
33) In C# Thread.Sleep(time) measures time in:
a) seconds
b) milliseconds - correct answer
c) nanoseconds
d) all of the above
34) When a thread returns from a WaitSleepJoin or Suspended state it returns to the:
a) Unstarted state
b) Stopped state
c) Started state (now considering a part of the running state) - correct answer
d) Resume state
35) The ThreadPriority enumeration does not contain:
a) Lowest
b) Highest
c) BelowNormal
d) None of the above - correct answer
36) The way of returning a thread from s suspended state is:
a) Pulse
b) PulseAll
c) Interrupt
a) System.Strings namespace
b) System.Text namespace
c) System.Chars namespace
d) System namespace - correct answer
39) A String literal is a:
a) !string
b) @string - correct answer
c) #string
d) $string
41) String indexers treat strings as:
a) binary code
b) 1 to string Length
c) arrays of characters - correct answer
d) a character
42) If an IndexofAny method is passed an array of characters it:
a) reserved words
b) method calls
c) operator overloading
a) String = string.ToLower(string);
b) ToLower(string);
c) string.ToLower(); - correct answer
d) string.ToLower(string);
a) C-sharp
b) VB
c) C++
d) a and b - correct answer
2) When an .aspx page is requested from the web server, the out put will be rendered to
browser in following format.
a) Page_Load()
b) Page_Init() - correct answer
c) Page_click()
5) Postback occurs in which of the following forms.
a) Winforms
b) HTMLForms
c) Webforms - correct answer
6) What namespace does the Web page belong in the .NET Framework class hierarchy?
a) User controls are displayed correctly in the Visual Studio .NET Designer
b) Custom controls are displayed correctly in VS.Net Designer - correct answer
c) User and Custom controls are displayed correctly in the Visual Studio .NET
Designer.
10) To add a custom control to a Web form we have to register with.
a) TagPrefix
b) Name space of the dll that is referenced
c) Assemblyname
d) All of the above - correct answer
11) Custom Controls are derived from which of the classes
a) System.Web.UI.Webcontrol
b) System.Web.UI.Customcontrol
c) System.Web.UI.Customcontrols.Webcontrol - correct answer
12) How ASP.Net Different from classic ASP?
a) .Asmx
b) .Ascx - correct answer
c) .Aspx
17) Which of the following is true?
a) 1 - correct answer
b) 2
c) 3
d) More than 3
19) How do you manage states in asp.net application
a) Session Objects
b) Application Objects
c) Viewstate
d) All of the above - correct answer
20) Which property of the session object is used to set the local identifier?
a) SessionId
b) LCID - correct answer
c) Item
d) Key
21) Select the caching type supported by ASP.Net
a) Output Caching
b) DataCaching
c) a and b - correct answer
d) none of the above
a) 1
b) 10
c) 20 - correct answer
d) More than 30
27) Select the control which does not have any visible interface.
a) Datalist
b) DropdownList
c) Repeater - correct answer
d) Datagrid
28) How do you explicitly kill a user session?
a) Session.Close( )
b) Session.Discard( )
c) Session.Abandon - correct answer
d) Session.End
e) Session.Exit
29) Which of the following is not a member of ADODBCommand object?
a) ExecuteReader
b) ExecuteScalar
10
c) ExecuteStream
d) Open - correct answer
e) CommandText
30) Which one of the following namespaces contains the definition for IdbConnection?
a) System.Data.Interfaces
b) System.Data.Common
c) System.Data - correct answer
d) System.Data.Connection
SQL ADVANCED
1) What will be the output of the following statement? SELECT LEN(CAST(LEFT('026-100', 3)
AS INT))
a) 2 - correct answer
b) 3
c) 7
d) Statement will generate an error.
2) What will be the output of the following statement? SELECT CAST(-1 AS SMALLDATETIME)
a) 1900-01-01 00:00:00.000
b) 1899-01-01 00:00:00.000
c) 1752-01-01 00:00:00.000
d) The system will generate an error. Only positive integer values can be
converted to a SMALLDATETIME data type. - correct answer
3) What will be the output of the following statement? SELECT ROUND(123.89, -1)
11
d) An error is generated.
6) View text definitions are stored in which system table?
a) sysobjects
b) syscolumns
c) syscomments - correct answer
d) sysviews
7) What's the maximum value can an INT data type hold?
a) DATETIME
b) INT - correct answer
c) SMALLDATETIME
d) VARCHAR
9) Which of the following is NOT a valid description of the public role?
a) The public role captures all default permissions for users in a database.
b) The public role cannot be dropped.
c) The public role is contained in every database, including msdb, tempdb,
model, and all user databases except in the master database for security purposes. correct answer
d) The public role cannot have users, groups, or roles assigned to it.
10) What is the maximum date value that can be stored in a SMALLDATETIME data type?
12