Sie sind auf Seite 1von 22

Mock Examination for VARUN RAJENDRA DIXIT Student Name VARUN RAJENDRA DIXIT Time seconds left PRN

Number Y004605 Marks 2 Course Building Web Portals Through ASP.NET Date 29 Jun 2011 [1] Which of the following statements are correct about the C#.NET code snippet given below? int i ; int j = new int( ) ; i = 10 ; j = 20 ; String str ; str = i.ToString( ) ; str = j.ToString( ) ; Choice a This is a perfectly workable code snippet Choice b Since int is a primitive, we cannot use new with it. Choice c Since an int is a primitive, we cannot call the method ToString( ) using it. Choice d i will get created on stack, whereas j will get created on heap

[2] Which of the following is the correct syntax for the GridView? Choice a <asp:gridview id="CustomersGridView" ></asp> Choice b <asp:gridview id="CustomersGridView" ><gridview> Choice c <asp:gridview id="CustomersGridView" runat="server" /> Choice d <asp:gridview id="CustomersGridView" ></>

[3] Which of the following is the correct syntax for HTML Anchor Control?

Choice a <a href="linkurl" name="bookmarkname" OnServerClick="onserverclickhandler" target="linkedcontentframeorwindow" title="titledisplayedbybrowser" runat="server" > linktext</a> Choice b <a href="linkurl" name="bookmarkname" OnServerClick="onserverclickhandler" target="linkedcontentframeorwindow" title="titledisplayedbybrowser" runat="server" > linktext Choice c <a href="linkurl" name="bookmarkname" OnServerClick="onserverclickhandler" target="linkedcontentframeorwindow" title="titledisplayedbybrowser" runat="server" > linktext<a> Choice d <a href="linkurl" name="bookmarkname" OnServerClick="onserverclickhandler" target="linkedcontentframeorwindow" title="titledisplayedbybrowser" runat="server" > linktext</a href>

[4] How we can control the vertical alignment of the cell in the HTML table control? Choice a ColSpan Choice b NoWrap Choice c VAlign Choice d HAlign

[5] Which of the following statements are true about compilation of .aspx pages in ASP.NET? Choice a All .aspx pages are compiled when the application starts. Choice b An .aspx page is compiled for every request. Choice c An .aspx page gets compiled when first request is made for it. Choice d All .aspx pages get compiled when the session state starts.

[6] In ASP.NET which of the following properties is used for ascertaining whether the page is being loaded in response to a client postback, or is it being loaded and accessed for the first time? Choice a Page.IsReusable Property Choice b Page.IsValid Property Choice c Page.Request Property Choice d Page.IsPostBack Property

[7] By which property of checkbox HTML server control we can get to know whether the checkbox is selected or not? Choice a OnSubmit Choice b Value Choice c Checked Choice d Selected

[8] Which is the correct syntax for include directive in ASP.NET? Choice a <!-- #include pathtype = filename --> Choice b <% @ include attribute="attr1" %> Choice c <% #include pathtype = filename %> Choice d <% @include pathtype = filename %>

[9] What does HTMLTable Control do? Choice a It creates the Table within the form. Choice b It deletes the Table within the form. Choice c It selects the Table within the form. Choice d It modifies the Table within the form.

[10] What does AccessDataSource do? Choice a It is used for connecting to SqlServer 2005 Choice b It is used for connecting to Oracle DB Server Choice c It is used for connecting to SqlServer Choice d It is used for connecting to MS Access Database

[11] Which of the following statements are correct? I. An event is a way for a class to provide notifications. II. Events use delegates to provide type-safe encapsulation of the methods that will be called when triggered. Choice a Only I is correct. Choice b Only II is correct. Choice c Both I and II are correct. Choice d Both I and II are incorrect.

[12] Which of the following keyword is used with an event to make the event available to callers at any time, even if no instance of the class exists? Choice a public Choice b static Choice c virtual Choice d abstract

[13] Which WebForm Validator control will you use if you want to ascertain whether the values in two different WebForm controls are same or not? Choice a CheckValidator Control Choice b CompareValidator Control Choice c RangeValidater Control Choice d RequiredFieldValidator Control

[14] Which of the following statements are correct? I. XML provides a way to describe structured data. II. XML tags are used to control the display and appearance of data. Choice a Only I is correct. Choice b Only II is correct. Choice c Both I and II are correct. Choice d Both I and II are incorrect.

[15] Which of the following statements are correct?

I. We can define an limited set of XML tags. II. As XML tags are adopted throughout an organization and across organizations, data from all kinds of different data stores will be easier to exchange and manipulate. Choice a Only I is correct. Choice b Only II is correct. Choice c Both I and II are correct. Choice d Both I and II are incorrect.

[16] Malicious user input can be used to launch the attacks named Choice a SQL Virus Choice b SQL Injection Choice c SQL Injuries Choice d SQL Damage

[17] What is the correct syntax for Connection String? Choice a Data Source=.\SQL;Initial Catalog=Customers;Integrated Security=True; Choice b Data Source=.\SQLEXPRESS;Initial Catalog=Customers;Integrated Security=False; Choice c Data Source=.\SQLServer;Initial Catalog=Customers;Integrated Security=True; Choice d Data Source=.\SQLEXPRESS;Initial Catalog=Customers;Integrated Security=True

[18] Which of the following models correctly represents the scenario given below? - Connect to database server - Process data - Close connection Choice a Disconnected model Choice b Connected model Choice c ODBC model Choice d Data Access Object model

[19] What one of the following keyword is used in connection string for attaching to a file? Choice a DBFile Choice b AttachDBFilename Choice c DBFilename Choice d DBFilename=<filename>

[20] Which of the following method is used in data binding expression syntax when data can be modified? Choice a Eval Choice b Bind Choice c Bind or Eval Choice d None of the above

[21] What are the types of server controls that participate in declarative data binding model? Choice a DataBind controls and Data-bound controls Choice b Data source controls and Data-bound controls Choice c Data source controls and DataGrid controls Choice d Data source controls and Data-Ubound controls

[22] Which control allows you to edit, delete, and insert records? Choice a GridView Choice b FormView Choice c DetailsView Choice d TagView

[23] Which of the following statements are correct? Choice a A. Procedural Programming paradigm is different than structured programming paradigm. Choice b B. Object Oriented Programming paradigm stresses on dividing the logic into smaller parts and writing procedures for each part. Choice c Classes and objects are corner stones of structured programming paradigm. Choice d Object Oriented Programming paradigm gives equal importance to data and the procedures that work on the data.

[24] Which of the following statements are correct about the C#.NET code snippet given below? sample c ; c = new sample( ) ; Choice a It will create an object called sample. Choice b It will create a nameless object of the type sample. Choice c It will create an object of the type sample on the stack. Choice d It will create an object of the type sample either on the heap or on the stack depending on the size of the object.

[25] Which of the following control searches the current naming container for the specified server control? Choice a GetType Choice b FindControl Choice c GetHashCode Choice d GetControl

[26] What data types do the RangeValidator controls support in ASP.NET? Choice a Integer, Decimal, Double Choice b Date, Decimal Choice c Integer, String, Date

Choice d String, Decimal

[27] Which of the following statements are correct? I. XML Schemas support reusable types and allow to create new types using inheritance. II. XML Schemas does not allow to group elements to control the recurrence of elements and attributes. III. While creating XML Schemas the individual elements and attributes are defined and valid types are assigned to them. Choice a Only I and II are correct. Choice b Only I and III are correct. Choice c Only II and III are correct. Choice d I, II and III are correct.

[28] Suppose multiple clients access multiple business components which in turn access or modify the data stored in different databases. Which of the following application type perfectly models this scenario? Choice a N-Tier Application Choice b Single Tier Application Choice c Two Tier Application Choice d Three Tier Application

[29] A derived class can stop virtual inheritance by declaring an override as Choice a

Inherits Choice b extends Choice c sealed Choice d NotInheritable

[30] Which of the following is the correct syntax for HTML Image Control? Choice a <img id="programmaticID" alt="alttext" align= top border="borderwidth" height="imageheight" src="imageURL" width="imagewidth" runat="server" > Choice b <img id:"programmaticID" alt:"alttext" align: top border:"borderwidth" height:"imageheight" src:"imageURL" width:"imagewidth" runat:"server" > Choice c <img id"programmaticID" alt"alttext" align top border"borderwidth" height"imageheight" src"imageURL" width"imagewidth" runat"server" > Choice d <img id="programmaticID" alt="alttext" align= top border="borderwidth" height="imageheight" src="imageURL" width="imagewidth" runat="server" ></img>

............................net...........................................

[1] Which of the following statements are correct about the C#.NET code snippet given below? int i ;

int j = new int( ) ; i = 10 ; j = 20 ; String str ; str = i.ToString( ) ; str = j.ToString( ) ; Choice a This is a perfectly workable code snippet Choice b Since int is a primitive, we cannot use new with it. Choice c Since an int is a primitive, we cannot call the method ToString( ) using it. Choice d i will get created on stack, whereas j will get created on heap

[2] By which property of checkbox HTML server control we can get to know whether the checkbox is selected or not? Choice a OnSubmit Choice b Value Choice c Checked Choice d Selected

[3] How we can control the vertical alignment of the cell in the HTML table control? Choice a ColSpan Choice b NoWrap Choice c VAlign Choice d HAlign

[4] Which is the correct syntax for include directive in ASP.NET? Choice a <!-- #include pathtype = filename --> Choice b <% @ include attribute="attr1" %> Choice c <% #include pathtype = filename %> Choice d <% @include pathtype = filename %>

[5] Which of the following is the correct syntax for HTML Anchor Control? Choice a <a href="linkurl" name="bookmarkname" OnServerClick="onserverclickhandler" target="linkedcontentframeorwindow" title="titledisplayedbybrowser" runat="server" > linktext</a> Choice b <a href="linkurl" name="bookmarkname" OnServerClick="onserverclickhandler" target="linkedcontentframeorwindow" title="titledisplayedbybrowser" runat="server" > linktext Choice c <a href="linkurl" name="bookmarkname" OnServerClick="onserverclickhandler" target="linkedcontentframeorwindow" title="titledisplayedbybrowser" runat="server" > linktext<a> Choice d <a href="linkurl" name="bookmarkname" OnServerClick="onserverclickhandler" target="linkedcontentframeorwindow" title="titledisplayedbybrowser" runat="server" > linktext</a href>

[6] In ASP.NET which of the following properties is used for ascertaining whether the page is being loaded in response to a client postback, or is it being loaded and accessed for the first time? Choice a Page.IsReusable Property Choice b

Page.IsValid Property Choice c Page.Request Property Choice d Page.IsPostBack Property

[7] What does HTMLTable Control do? Choice a It creates the Table within the form. Choice b It deletes the Table within the form. Choice c It selects the Table within the form. Choice d It modifies the Table within the form.

[8] Which of the following is the correct syntax for the GridView? Choice a <asp:gridview id="CustomersGridView" ></asp> Choice b <asp:gridview id="CustomersGridView" ><gridview> Choice c <asp:gridview id="CustomersGridView" runat="server" /> Choice d <asp:gridview id="CustomersGridView" ></>

[9] Which of the following statements are true about compilation of .aspx pages in ASP.NET? Choice a All .aspx pages are compiled when the application starts. Choice b An .aspx page is compiled for every request. Choice c An .aspx page gets compiled when first request is made for it. Choice d

All .aspx pages get compiled when the session state starts.

[10] What does AccessDataSource do? Choice a It is used for connecting to SqlServer 2005 Choice b It is used for connecting to Oracle DB Server Choice c It is used for connecting to SqlServer Choice d It is used for connecting to MS Access Database

[11] Which of the following statements are correct? I. An event is a way for a class to provide notifications. II. Events use delegates to provide type-safe encapsulation of the methods that will be called when triggered. Choice a Only I is correct. Choice b Only II is correct. Choice c Both I and II are correct. Choice d Both I and II are incorrect.

[12] Which of the following keyword is used with an event to make the event available to callers at any time, even if no instance of the class exists? Choice a public Choice b

static Choice c virtual Choice d abstract

[13] Which WebForm Validator control will you use if you want to ascertain whether the values in two different WebForm controls are same or not? Choice a CheckValidator Control Choice b CompareValidator Control Choice c RangeValidater Control Choice d RequiredFieldValidator Control

[14] Which of the following statements are correct? I. XML provides a way to describe structured data. II. XML tags are used to control the display and appearance of data. Choice a Only I is correct. Choice b Only II is correct. Choice c Both I and II are correct. Choice d Both I and II are incorrect.

[15] Which of the following statements are correct?

I. We can define an limited set of XML tags. II. As XML tags are adopted throughout an organization and across organizations, data from all kinds of different data stores will be easier to exchange and manipulate. Choice a Only I is correct. Choice b Only II is correct. Choice c Both I and II are correct. Choice d Both I and II are incorrect.

[16] What one of the following keyword is used in connection string for attaching to a file? Choice a DBFile Choice b AttachDBFilename Choice c DBFilename Choice d DBFilename=<filename>

[17] Malicious user input can be used to launch the attacks named Choice a SQL Virus Choice b SQL Injection Choice c SQL Injuries Choice d SQL Damage

[18] Which of the following models correctly represents the scenario given below? - Connect to database server - Process data - Close connection Choice a Disconnected model Choice b Connected model Choice c ODBC model Choice d Data Access Object model

[19] What is the correct syntax for Connection String? Choice a Data Source=.\SQL;Initial Catalog=Customers;Integrated Security=True; Choice b Data Source=.\SQLEXPRESS;Initial Catalog=Customers;Integrated Security=False; Choice c Data Source=.\SQLServer;Initial Catalog=Customers;Integrated Security=True; Choice d Data Source=.\SQLEXPRESS;Initial Catalog=Customers;Integrated Security=True

[20] Which of the following method is used in data binding expression syntax when data can be modified? Choice a Eval Choice b Bind Choice c Bind or Eval Choice d None of the above

[21] What are the types of server controls that participate in declarative data binding model? Choice a DataBind controls and Data-bound controls Choice b Data source controls and Data-bound controls Choice c Data source controls and DataGrid controls Choice d Data source controls and Data-Ubound controls

[22] Which control allows you to edit, delete, and insert records? Choice a GridView Choice b FormView Choice c DetailsView Choice d TagView

[23] Which of the following statements are correct? Choice a A. Procedural Programming paradigm is different than structured programming paradigm. Choice b B. Object Oriented Programming paradigm stresses on dividing the logic into smaller parts and writing procedures for each part. Choice c Classes and objects are corner stones of structured programming paradigm. Choice d Object Oriented Programming paradigm gives equal importance to data and the procedures that work on the data.

[24] Which of the following statements are correct about the C#.NET code snippet given below? sample c ; c = new sample( ) ; Choice a It will create an object called sample. Choice b It will create a nameless object of the type sample. Choice c It will create an object of the type sample on the stack. Choice d It will create an object of the type sample either on the heap or on the stack depending on the size of the object.

[25] Which of the following control searches the current naming container for the specified server control? Choice a GetType Choice b FindControl Choice c GetHashCode Choice d GetControl

[26] What data types do the RangeValidator controls support in ASP.NET? Choice a Integer, Decimal, Double Choice b Date, Decimal

Choice c Integer, String, Date Choice d String, Decimal

[27] Which of the following statements are correct? I. XML Schemas support reusable types and allow to create new types using inheritance. II. XML Schemas does not allow to group elements to control the recurrence of elements and attributes. III. While creating XML Schemas the individual elements and attributes are defined and valid types are assigned to them. Choice a Only I and II are correct. Choice b Only I and III are correct. Choice c Only II and III are correct. Choice d I, II and III are correct.

[28] Suppose multiple clients access multiple business components which in turn access or modify the data stored in different databases. Which of the following application type perfectly models this scenario? Choice a N-Tier Application Choice b Single Tier Application Choice c Two Tier Application Choice d Three Tier Application

[29] A derived class can stop virtual inheritance by declaring an override as Choice a Inherits Choice b extends Choice c sealed Choice d NotInheritable

[30] Which of the following is the correct syntax for HTML Image Control? Choice a <img id="programmaticID" alt="alttext" align= top border="borderwidth" height="imageheight" src="imageURL" width="imagewidth" runat="server" > Choice b <img id:"programmaticID" alt:"alttext" align: top border:"borderwidth" height:"imageheight" src:"imageURL" width:"imagewidth" runat:"server" > Choice c <img id"programmaticID" alt"alttext" align top border"borderwidth" height"imageheight" src"imageURL" width"imagewidth" runat"server" > Choice d <img id="programmaticID" alt="alttext" align= top border="borderwidth" height="imageheight" src="imageURL" width="imagewidth" runat="server" ></img>