free mock test

HTML MCQ Questions

Q1. Get method passes the values to destination page

(A). Through HTTP headers

(B). Cookies

(C). Querystring

(D). none

Show Answer
Q2. Which of the following is true

(A). Get method can send more data than post method

(B). Post method can send more data than get method

(C). Both can send equal number of bytes

(D). none

Show Answer
Q3. Output of the following : <HTML> <BODY> HARTRON1 <SCRIPT LANGUAGE=”VBSCRIPT” RUNAT=”SERVER”> response.write(“HARTRON 2”) </SCRIPT> will be:-

(A). HARTRON1 HARTRON 2

(B). HARTRON2 HARTRON1

(C). HARTRON 2

(D). invalid HTML page

Show Answer
Q4. HTTP_REFERER tells

(A). The type of browser website user is using

(B). IP address of visitor to website

(C). How the visitor arrived to a website

(D). Internet address of server

Show Answer
Q5. Which of following is true : <!– #INCLUDE FILE=”—” –>

(A). is used when file is located within any directory in your website

(B). is used when physical path to include file is supplied

(C). is same as #include virtual

(D). none

Show Answer
Q6. Which is true

(A). Include directives are processed before scripts

(B). Include directives are processed after scripts

(C). can be used to dynamically include files

(D). none

Show Answer
Q7. Server variable SCRIPT_NAME tells

(A). the browser name

(B). name of script used

(C). path of current page

(D). none

Show Answer
Q8. Cookies are passed between server and browser

(A). Through querystrings

(B). Through HTTP headers

(C). Session variables

(D). Application variables

Show Answer
Q9. Keyset-driven cursor

(A). Provides the fastest performance of all cursors

(B). Does not support scrolling

(C). Can detect any changes made to table while cursor is open (deletion, insertion, updation)

(D). Can reflect updated data only while cursor is open and not deletion, insertion

Show Answer
Q10. MoveFirst method

(A). Cannot work with forward only cursor

(B). Moves to next record with forward only cursor

(C). may move to first record with forward only cursor

(D). none

Show Answer
Q11. Paging properties can not be used with

(A). Forward only

(B). Static

(C). Keyset

(D). Dynamic

Show Answer
Q12. “<% myfile = “firstpage.asp” %>” <!–#include file = “<%= myfile %–>

(A). will include a file named “<% = myfile %>”

(B). will hang the application

(C). will generate error

(D). none

Show Answer
Q13. RecordCount property when used with forward-only cursor returns

(A). 0

(B). 1

(C). -1

(D). generates error

Show Answer
Q14. Which of following is true

(A). Application variables and session variables are specific to particular user

(B). only application variable are user specific

(C). Application variables are shared among all users

(D). session variables are shared among all users

Show Answer
Q15. Session variables work with help of

(A). cookies

(B). querystring

(C). HTTP headers

(D). any of these

Show Answer
Q16. Best way to maintain website state is through

(A). cookies

(B). querystrings

(C). session variables

(D). hidden fields

Show Answer
Q17. Utility used to send E-mail in ASP is

(A). content rotator

(B). index server

(C). CDONTS

(D). none of these

Show Answer
Q18. Which of following is true

(A). HTTP protocol can not be used to retain the state of user

(B). HTTP maintains state of user as session variables

(C). HTTP protocol maintains state but not like session variables

(D). none

Show Answer
Q19. To send output to browser which of following objects is used in ASP

(A). request.write

(B). document.write

(C). response.print

(D). response.write

Show Answer
Q20. <% Response.buffer = TRUE %> <% for i = 1 to 500 : Response.write(i) : Next %> will generate

(A). 500

(B). display 1 through 500 down the browser screen

(C). generates error

(D). anyone of a and b depending on browser

Show Answer
Q21. When the page is not buffered which of following properties can work

(A). End

(B). Flush

(C). Clear

(D). all

Show Answer
Q22. <% Response.write(“first page”) : Response.redirect(“/another page.asp”) : Response.write(“third page”) %> another page : <% Response.write(“Second page”) %>

(A). first page second page third page

(B). second page

(C). first page second page

(D). second page third page

Show Answer
Q23. What is the output of the following statement: Response.cookies(“News”)(“sports”) = “cricket”

(A). Creates a dictionary of cookies and name it News

(B). Creates a dictionary of cookies and name it sports

(C). delete a cookie named news

(D). None of these

Show Answer
Q24. Which of the following is not a CGI programming language

(A). C++

(B). Visual Basic

(C). Shell Languages

(D). None of these

Show Answer
Q25. XML is based on

(A). HTML

(B). DHTML

(C). SGML

(D). None of these

Show Answer
Q26. Which of the following is true:

(A). DHTML & HTML allows to create and use own tags

(B). both XML and DHTML are dynamic

(C). XML allows to create and use own tags

(D). None of these

Show Answer
Q27. <%var =” he said , ” “Hello ! “””%> <input name=” my field ” type=”text” value=”<% server.HTMLEncode(var)%>”> when this program is executed the value in the text box is:

(A). ” he said , ” ” hello ! “””

(B). “he said,”

(C). he said , ” ” hello ! “”

(D). None of these

Show Answer
Q28. Which of the following is true

(A). The Lock method of Application object prevents other scripts from modifying an application variable

(B). Response object represents the HTTP request sent by client

(C). both (a) & (b) are true

(D). None of these

Show Answer
Q29. The result of the following statement Response.cookies(“news”) = Date() – 1

(A). declare a cookie named news

(B). delete cookie news

(C). set value (Date() – 1) to cookie news

(D). None of these

Show Answer
Q30. The ServerVariables collection of Request object represents

(A). controls on a form

(B). parameter values in the HTTP request

(C). values of pre-determined environment variables

(D). None of these

Show Answer
Q31. What following statement will do when executed session.abandon

(A). abandon the session later on

(B). terminates the session by releasing its session object

(C). asks the user whether to terminate or not

(D). None of these

Show Answer
Q32. what is true about request object

(A). represents the response sent to the client

(B). represent the HTTP request made by the client to the script

(C). represents viewer session

(D). represents web application

Show Answer
Q33. <script language=” VBScript”> sub window-onload() document.locatioo.hrf =” put.asp” end sub </script> output of the program is:

(A). results in error

(B). put.asp file is displayed when window is loaded

(C). won’t display anything

(D). None of these

Show Answer
Q34. <% Response.write(“first page”) Server.execute “/another page.asp” Response.write(“third page”) %> Another page <% Response.write(“second page”) %> output will be :

(A). first page second page third page

(B). second page

(C). first page second page

(D). second page third page

Show Answer
Q35. page is used to

(A). specify information about document to browsers,applications,search engines

(B). specify preformatted text to include within a document

(C). both

(D). none

Show Answer
Q36. Default cursor type of a recordset is

(A). Forward only

(B). Static

(C). Keyset

(D). Dynamic

Show Answer
Q37. Advantages of server side cursor over client side cursor is :

(A). That it increases the performance of application

(B). does not place much work on database server

(C). does not place much work on web server

(D). both are more or less same

Show Answer
Q38. RecordCount property is supported by following cursor(s)

(A). Forward only

(B). Static

(C). Keyset

(D). Dynamic

Show Answer
Q39. Which of the following is not a collection of request object

(A). Client Certificate

(B). cookies

(C). contents

(D). contents

Show Answer
Q40. What is true about collection query string of the request object(built in object of ASP)

(A). Value of field stored in client certificate

(B). value of predetermined enviornment variables

(C). value of cookies send in the HTTP reuquest

(D). value of parameters In the HTTP request

Show Answer
Q41. Which of the following is built in ASP object to execute transactional scripts

(A). Application

(B). Request

(C). Object context

(D). Server

Show Answer
Q42. Output of the following ASP program will be <home> <%x=”hello” %> <b> <% Response.write(x) %> </b> </home>

(A). Program won’t execute

(B). will give error x undefined

(C). Hello

(D). will give error : Server script time out

Show Answer
Q43. Output of the following program will be <% dim a response.write (“Hello world” ) Responswe.end %> <% response.write (“Hey “) %>

(A). program generates error

(B). Hello world

(C). hello world hey

(D). Hey

Show Answer
Q44. To create a new cookie with the name News we have to write

(A). Response.cookies (“News”)=”Sports”

(B). Set Request (“News”)=”Sports”

(C). server.cookies (“News”) =”Sports”

(D). session.cookies (“News”)=”India”

Show Answer
Q45. Result of the following statement is <% Response.write Server.HTMLEncode(” To display in bold use <b> and <lb> tags “) %> </lb> </b>

(A). To display in bold use and tags

(B). To display in bold use < B > and < lB > tags

(C). will generate error

(D). To display in bold use tags

Show Answer
Q46. To connect to a different URL using response object which of the methods is used

(A). Execute

(B). Flush

(C). redirect

(D). end

Show Answer
Q47. The property absolute page of recordset object specifies

(A). specifies the position of the current row in a rec

(B). Specify the page on which the current row resides

(C). specifies the command object that created the recordset object

(D). specify the connection used

Show Answer
Q48. LCID( locate identifier ) is the property of which built in ASP object

(A). application

(B). session

(C). server

(D). object context

Show Answer
Q49. To delete Cookie “News” the statement used is

(A). Response.cookies (“news”)=Date()+1

(B). Response.cookies (“news”)=Date()

(C). Response.cooki es(“news”)=null ()

(D). Response.cookies (“news”)=Date()-1

Show Answer
Q50. <% var= “he said , “” hey ! “” ” % > < html > < input type = “text ” name = ” myfield” value = “< % =var % > “> < / html > value appeared on the text field is:

(A). He said ,”” hey ! “”

(B). he said ,

(C). he said , ” “

(D). “” hey ! “”

Show Answer
Q51. Cookies are sent to the client as part of :

(A). Controls on the form

(B). HTTP reader

(C). session variables

(D). none of these

Show Answer
Q52. what will happen when statement response.end is executed.

(A). Sends buffered output to the client

(B). stops processing of file and sends buffered output to the client

(C). erase any buffered HTML output

(D). None of these

Show Answer

Loading

WhatsApp Icon