Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Advanced Web Programming Soln

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Vidyanidhi Info Tech Academy

PG DAC Question Bank

Contents
Architecture of web .................................................................................................................................................................... 1
HTML ........................................................................................................................................................................................... 4
CSS ............................................................................................................................................................................................ 15
PHP............................................................................................................................................................................................ 23
XML ........................................................................................................................................................................................... 30
JSON .......................................................................................................................................................................................... 33
AJAX .......................................................................................................................................................................................... 34
Web Security ............................................................................................................................................................................. 34
UI ............................................................................................................................................................................................... 35

Architecture of web
1. A piece of icon or image on a web page associated with another webpage is called
a) url b) hyperlink c) plugin d) none of the mentioned

2. Dynamic web page


a) is same every time whenever it displays
b) generates on demand by a program or a request from browser
c) both (a) and (b)
d) none of the mentioned

3. What is a web browser?


a) a program that can display a web page
b) a program used to view html documents
c) it enables user to access the resources of internet
d) all of the mentioned

4. Common gateway interface is used to


a) generate executable files from web content by web server
b) generate web pages
c) stream videos
d) none of the mentioned

5. URL stands for


a) unique reference label b) uniform reference label
c) uniform resource locator d) unique resource locator

6. A web cookie is a small piece of data


a) sent from a website and stored in user’s web browser while a user is browsing a website
b) sent from user and stored in the server while a user is browsing a website
c) sent from root server to all servers
d) none of the mentioned

1
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
7. Which one of the following is not used to generate dynamic web pages?
a) PHP b) ASP.NET c) JSP d) None of the mentioned

8. An alternative of javascript on windows platform is


a) VBScript b) ASP.NET c) JSP d) None of the mentioned

9. What is document object model (DOM)?


a) convention for representing and interacting with objects in html documents
b) application programming interface
c) hierarchy of objects in ASP.NET
d) none of the mentioned

10. AJAX stands for


a) asynchronous javascript and xml b) advanced JSP and xml
c) asynchronous JSP and xml d) advanced javascript and xml

11. The number of objects in a Web page which consists of 4 jpeg images and HTML text is ________
a) 4 b) 1 c) 5 d) None of the mentioned
Explanation: 4 jpeg images + 1 base HTML file.

12. The default connection type used by HTTP is _________


a) Persistent b) Non-persistent
c) Either of the mentioned d) None of the mentioned

13. The time taken by a packet to travel from client to server and then back to the client is called
a) STT b) RTT c) PTT d) None of the mentioned
Explanation: RTT stands for round-trip time.

14. The HTTP request message is sent in _________ part of three-way handshake.
a) First b) Second c) Third d) None of the mentioned

15. In the process of fetching a web page from a server the HTTP request/response takes __________ RTTs.
a) 2 b) 1 c) 4 d) 3

16. The first line of HTTP request message is called _____________


a) Request line b) Header line c) Status line d) Entity line
Explanation: The line followed by request line are called header lines and status line is the initial part of
response message.

17. The values GET, POST, HEAD etc are specified in ____________ of HTTP message
a) Request line b) Header line c) Status line d) Entity body
Explanation: It is specified in the method field of request line in the HTTP request message.

18. The __________ method when used in the method field, leaves entity body empty.
a) POST b) GET c) Both of the mentioned d) None of the mentioned

19. The HTTP response message leaves out the requested object when ____________ method is used
a) GET b) POST c) HEAD d) PUT

20. Find the oddly matched HTTP status codes


a) 200 OK b) 400 Bad Request

2
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
c) 301 Moved permanently d) 304 Not Found
Explanation: 404 Not Found.

21. Which of the following is not correct ?


a) Web cache doesnt has its own disk space
b) Web cache can act both like server and client
c) Web cache might reduce the response time
d) Web cache contains copies of recently requested objects

22. The conditional GET mechanism


a) Imposes conditions on the objects to be requested
b) Limits the number of response from a server
c) Helps to keep a cache upto date
d) None of the mentioned

13. Which of the following is present in both an HTTP request line and a status line?
a) HTTP version number b) URL c) Method d) None of the mentioned

14. Multiple object can be sent over a TCP connection between client and server in
a) persistent HTTP b) nonpersistent HTTP
c) both (a) and (b) d) none of the mentioned

15. HTTP is ________ protocol.


a) application layer b) transport layer
c) network layer d) none of the mentioned

16. In the network HTTP resources are located by


a) uniform resource identifier
b) unique resource locator
c) unique resource identifier
d) none of the mentioned

17. HTTP client requests by establishing a __________ connection to a particular port on the server.
a) user datagram protocol
b) transmission control protocol
c) broader gateway protocol
d) none of the mentioned

18. In HTTP pipelining


a) multiple HTTP requests are sent on a single TCP connection without waiting for the corresponding
responses
b) multiple HTTP requests can not be sent on a single TCP connection
c) multiple HTTP requests are sent in a queue on a single TCP connection
d) none of the mentioned

19. FTP server listens for connection on port number


a) 20 b) 21 c) 22 d) 23

20. In FTP protocol, client contacts server using ____ as the transport protocol.
a) transmission control protocol
3
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
b) user datagram protocol
c) datagram congestion control protocol
d) stream control transmission protocol

21. In which mode FTP, the client initiates both the control and data connections.
a) active mode b) passive mode
c) both (a) and (b) d) none of the mentioned

22. The file transfer protocol is built on


a) data centric architecture b) service oriented architecture
c) client server architecture d) none of the mentioned

23. In file transfer protocol, data transfer can be done in


a) stream mode b) block mode c) compressed mode d) all of the mentioned

HTML
Q1. Body tag do not have a attribute
a. text b. bgcolor c. font

Q2. To increase font size


a. <font size=5> b. <text size=5> c. <size=5>

Q3. It will bring the text on next line


a. <br> b. <break> c. <b>

Q4. It will always display data on next line


a. <p> b. <h> c. <pre>

Q5. It will display data after leaving one line


a. <h3> b. <p> c. <b>

Q6. In img tag align attribute can not have value


a. left b. right c. center

Q7. small tag increase font size


a. to 3 b. +1 from current size c. -1 from current size

Q8. big tag increase font size


a. to 4 b.+1 from current size c. -1 from current size

Q9. it is used to link two file


a. anchor tag b. link c. href

Q10. B and strong tag is used to make text


a. italic b. bold c. underline

Q11. It is used to give red color to the text


a. <font color=”red”> b. <fon color=”blue”> c. <text color=”red”>
4
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

Q12. minimum heading is


a. <h1> b. <h5> c. <h6>

Q13. Max heading is


a. <h6> b. <h5> c. <h1>

Q14. It is used to display data as it appear in editor


a. <BLOCKQUOTE> b. <PRE> c. <EM>

Q15. Hyperlink is also cold as


a. HOT SPOT b. LINK c. A

Q16. It is used to display data in center and bold in table tag


a. td b. th c. tr

Q17. It is used to display image


a. <image link=”pot.gif”> b. <img src=”pot.gif”> c.<img href=”pot.gif”>

Q18. which attribute is used to keep background fixed


a. bgproperties b. attachment c. scroll

Q19. It is used to animate text


a. blink b. marquee c.<a>

Q20. It is used to display horizontal line


a. <line> b. <hr> c.<vr>

Q21. This attribute will increase the speed of marquee text


a. scrollamount b. speed c. Behavior

Q22. This attribute of form take you to the another page


a. action b. anchor c.name

Q23. This display data of form in url


a. <form method=”post”> b. <form method=”get”> c. <form method=”dopost”>

Q24. How to give link to your email


a. <a href=”www.reidffmail.com”/>
b. c . <a href=”mailto:vita_trg@rediffmail.com”>
c. <a email=”vita_trg@rediaamail.com”>

Q25. It allows you to select only one option at a time


a. choice b. checkbox c. radio

Q26. It allows you to select multiple option at a time


b. Choice b. checkbox c. radio

5
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q27. What is the correct tag for drop down box
a. <select> b. <combobox> c. <option>

Q28. Which attribute enables you to select multiple option in dropdown box
a. multiple b. selected c. more

Q29. Which attribute display data on button


a.name b. value c. button

Q30. Which attributes value is used as variable


a. value b. name c. submit

Q31. What is default value of submit button in IE


a. SUBMITQUERY b. SUBMIT c. RESET

Q32. Correct tag to clear form


a. <input type=”reset” value=”reset”>
b. <input type=”clear” value=”reset”>
c. <input type=”button” value=”reset”>

Q33. To mark checkbox checked as default you use


a. <input type=”checkbox” checked=ch
b. <input type=”checkbox” checked=”true”>
c. <input type=”checkbox” checked=unchecked”>

Q34. What is the correct HTML for adding a background color?


a. <body bgcolor="yellow">
b. <background>yellow</background>
c. <body color="yellow">

Q35. How can you open a link in a new browser window?


a. <a href="url" target="_blank">
b. <a href="url" new>
c. <a href="url" target="new">

Q36. Choose the correct HTML to left-align the content inside a tablecell?
a. <tdleft> b. +<td leftalign> c. <td valign="left"> d. <td align="left">

Q37. How can you make a list that lists the items with bullets?
a. <ol> b. <list> c. <ul> d. <dl>

Q38. What is the correct HTML for making a drop-down list?


a. <list> b. <input type="dropdown"> c. <input type="list"> d. <select>

Q39. What is the correct HTML for making a text area?


a. <input type="textarea"> b. <textarea> c. <input type="textbox">

Q40. Links are also known as


6
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
a. Hotspots b. Anchors c. Both 1 and 2 d. None of the above

Q41. While ____ is a generic inline element that applies no inherent formatting, the ____ is a generic block
leve element that applies no inherent formatting.
a. DIV, SPAN b. GROUP, DIV c. SPAN, DIV d. SPAN, GROUP

Q42.How do you display hyperlinks without an underline?


a. {text-decoration:none} b. {text-decoration:no underline}
c. {underline:none} d. {decoration:no underline}

Q43. In the SELECT element, the attribute SIZE specifies


a. Height b. Width c. Max size d. Visible size

Q44. The SRC attribute of______ specifies the URL of a HTML file to be displayed in a Frame
a. IFrame b. Frameset c. src d. href

Q45. The linked regions of an image map are called_____


a. anchors b. source c. transfer d. hot regions

Q46. The ______attribute takes text to be displayed in case the Browser is unable to display the image specified
in the SRC attribute.
a. ALT b. href c. link d. vspace

Q47. Main protocol used in Internet is:


a. IPX/SPX b. Zolan Bus c. TCP/IP d. X.25

Q48. Who is making the Web standards?


a. The World Wide Web Consortium b. Microsoft c. Netscape

Q49.Which of these tags are all <table> tags?


a. <table><tr><tt> b. <thead><body><tr> c. <table><head><tfoot> d. <table><tr><td>

Q50. What is the correct HTML for inserting a background image?


a. <img src="background.gif" background>
b. <body background="background.gif">
c. <background img="background.gif">
Q51. How to open link in new unique window
a. Target=_new b. Target=_self c. Target=_blank

Q52. align attribute can not be used with


a. Hr b. H1 c. Font

Q53. What is ALT text


a. Text display when image is not found b. Text display when you hold mouse over image c. Both

Q54. How can you make a row stretch over 2 column


a. <td colspan=2> b. <td rowspan=2> c. <rd colspan=2>

Q55. How to define table background color


7
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
a. Background-color= b. bgcolor= c. ackgroundcolor=

Q56. How to table give border color


a. Border= b. Bordercolor= c. Bgcolor=

Q57. Default font size is


a. 7 b. 2 c. 3

Q58. Server is one who


a. Provide service b. Host website c. Both

Q59. It will put horizontal line on the text


a. Hr b. Strike c. Table

Q60. Tag used to give heading to option in select tag


a. <optgoup lable=”heading”> b. <option value=”heading”> c. <select name=”heading”>

Q61. Which two tag has same effect


a. <i>,<b> b.<strong><b> c. <b><cite>

Q62. Attribute used to increase the height of line in <hr> tag


a. Height b. Size c. Length

Q63. It will increase the speed of marquee tag


a. Scroll b. Scrollamount c. Behavior

Q64. What are the attribute of anchar tag


a. Name,href,target,src b. Name,href,target,title c. Href, tooltip,src

Q65. It interprete the html code


a. Server b. Browser c. notepad

Q66. Which of the following is true about HTML 5?


a. HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1.
b. HTML5 is a standard for structuring and presenting content on the World Wide Web.
c. HTML5 is a cooperation between the World Wide Web Consortium W3C and the Web Hypertext Application
Technology Working Group WHATWG.
d. All of the above.

Q67. Which of the following feature is a part of HTML 5?


a. Persistent Local Storage b. WebSocket c. Server-Sent Events d. All of the above.

Q68. Which of the following feature is a part of HTML 5?


a. Canvas b. Audio & Video c. Geolocation d. All of the above.

Q69. Which of the following browser supports HTML5 in its latest version?
a. Apple Safari b. Google Chrome c. Both of the above. d. None of the above.

Q70. Which of the following browser supports HTML5 in its latest version?
a. Mozilla Firefox b. Opera c. Both of the above. d. None of the above.
8
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

Q71. Which of the following browser supports HTML5 in its latest version?
a. Mozilla Firefox b. Opera c. Both of the above. d. None of the above.

Q72. Is HTML5 backward compatible with old browsers?


a. true b. false

Q73. Are HTML tags case sensitive?


a. true b. false

Q74. Which of the following tag represents a generic document or application section in HTML5?
a. section b. article c. aside d. header

Q75. Which of the following tag represents an independent piece of content of a document in HTML5?
a. section b. article c. aside d. header

Q76. Which of the following tag represents a piece of content that is only slightly related to the rest of the page
in HTML5?
a. section b. article c. aside d. header

Q77. Which of the following tag represents the header of a section in HTML5?
a. section b. article c. aside d. header

Q78. Which of the following tag represents the footer of a section in HTML5?
a. footer b. nav c. section d. dialog

Q79. Which of the following tag represents a section of the document intended for navigation in HTML5?
a. footer b. nav c. section d. dialog

Q80. Which of the following tag can be used to mark up a conversation in HTML5?
a. footer b. nav c. dialog d. figure

Q81. Which of the following tag can be used to associate a caption together with some embedded content in
HTML5?
a. footer b. nav c. dialog d. figure

Q82. Which of the following is correct about custom attributes in HTML5?


a. A custom data attribute starts with data- and would be named based on your requirement.
b. You would be able to get the values of these attributes using JavaScript APIs or CSS in similar way as you
get for standard attributes.
c. Both of the above. d. None of the above.

Q83. Which of the following is correct about custom attributes in HTML5?


a. A custom data attribute starts with data- and would be named based on your requirement.
b. You would be able to get the values of these attributes using JavaScript APIs or CSS in similar way as you
get for standard attributes.
c. Both of the above. d. None of the above.

Q84. Which of the following is correct about Web form 2.0 in HTML5?
a. Web Forms 2.0 is an extension to the forms features found in HTML4.
9
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
b. Form elements and attributes in HTML5 provide a greater degree of semantic mark-up than HTML4.
c. Form elements and attributes in HTML5 remove a great deal of the need for tedious scripting and styling
that was required in HTML4.
d. All of the above.

Q85. Which of the following is correct about Web form 2.0 in HTML5?
a. Web Forms 2.0 is an extension to the forms features found in HTML4.
b. Form elements and attributes in HTML5 provide a greater degree of semantic mark-up than HTML4.
c. Form elements and attributes in HTML5 remove a great deal of the need for tedious scripting and styling
that was required in HTML4.
d. All of the above.

Q86. Which of the following input control represents a date and time year, month, day, hour, minute, second,
fractions of a second encoded according to ISO 8601 with the time zone set to UTC in Web Form 2.0?
a. datetime b. datetime-local c. date d. month

Q87. Which of the following input control represents a date and time year, month, day, hour, minute, second,
fractions of a second encoded according to ISO 8601 with no time zone information in Web Form 2.0?
a. datetime b. datetime-local c. date d. month

Q88. Which of the following input control represents a date year, month, day encoded according to ISO 8601 in
Web Form 2.0?
a. datetime b. datetime-local c. date d. month

Q89. Which of the following input control represents a date consisting of a year and a month encoded according
to ISO 8601 in Web Form 2.0?
a. datetime b. datetime-local c. date d. month

Q90. Which of the following input control represents a date consisting of a year and a week number encoded
according to ISO 8601 in Web Form 2.0?
a. week b. time c. number d. range

Q91. Which of the following input control represents a time hour, minute, seconds, fraction al seconds encoded
according to ISO 8601 in Web Form 2.0?
a. week b. time c. number d. range

Q92. Which of the following input control accepts only numerical value in Web Form 2.0?
a. week b. time c. number d. range

Q93. Which of the following input control is used for input fields that should contain a value from a range of
numbers in Web Form 2.0?
a. week b. time c. number d. range

Q94. Which of the following input control is used for input fields that should contain an e-mail address in Web
Form 2.0?
a. email b. url c. number d. range

Q95. Which of the following input control is used for input fields that should contain an URL address in Web
Form 2.0?
a. email b. url c. number d. range
10
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

Q96. Which of the following tag is used to represent the result of different types of output in HTML5?
a. output b. placeholder c. autofocus d. required

Q97. Which of the following tag provides a hint to the user of what can be entered in the field in HTML5?
a. output b. placeholder c. autofocus d. required

Q98. Which of the following tag automatically focus one particular form field in HTML5?
a. output b. placeholder c. autofocus d. required

Q99. Which of the following tag insists to have a value in an input control in HTML5?
a. output b. placeholder c. autofocus d. required

Q100. Can you use SVG tags directly in HTML5 without any plugin?
a. true b. false

Q101. Can you use MathML tags directly in HTML5 without any plugin?
a. true b. false

Q102. Which of the following is true about Cookies?


a. Cookies are included with every HTTP request, thereby slowing down your web application by
transmitting the same data.
b. Cookies are included with every HTTP request, thereby sending data unencrypted over the internet.
c. Cookies are limited to about 4 KB of data .Not enough to store required data.
d. All of the above.

Q103. Which of the following is true about Session Storage in HTML5?


a. HTML5 introduces the session Storage attribute which would be used by the sites to add data to the
session storage.
b. It will be accessible to any page from the same site opened in that window i.e. session.
c. As soon as you close the window, session would be lost.
d. All of the above.

Q104. Which of the following is true about Local Storage in HTML5?


a. HTML5 introduces the local Storage attribute which would be used to access a page's local storage area
without no time limit.
b. This local storage will be available whenever you would use that page.
c. Both of the above.
d. None of the above.

Q105. When a session storage data gets deleted in HTML5?


a. The Session Storage Data would be deleted by the browsers immediately after the session gets
terminated.
b. If you want to clear all settings, you need to call localStorage. clear method.
c. Both of the above.
d. None of the above.

Q106. How to delete a local storage data in HTML5?

11
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
a. To clear a local storage setting you would need to call localStorage.remove′key′; where 'key' is the key of
the value you want to remove.
b. If you want to clear all settings, you need to call localStorage. clear method.
c. Both of the above.
d. None of the above.

Q107. Which of the following is correct about Server Side EventsSSE in HTML5?
a. Using SSE you can push DOM events continously from your web server to the visitor's browser.
b. The event streaming approach opens a persistent connection to the server, sending data to the client
when new information is available, eliminating the need for continuous polling.
c. Server-sent events standardizes how we stream data from the server to the client.
d. All of the above.

Q108. Which of the following is correct about Server Side EventsSSE in HTML5?
a. To use Server-Sent Events in a web application, you would need to add an <eventsource> element to
the document.
b. The src attribute of <eventsource> element should point to an URL which should provide a persistent
HTTP connection that sends a data stream containing the events.
c. The URL would point to a PHP, PERL or any Python script which would take care of sending event data
consistently.
d. All of the above.

Q109. Which of the following is correct Content-type header that a server side script should send for SSE in
HTML5?
a. Content-Type: text/event-stream b. Content-Type: text/application-stream
c. Content-Type: text/data-stream d. None of the above.

Q110. Which of the following is correct about WebSockets in HTML5?


a. Web Sockets is a next-generation bidirectional communication technology for web applications which
operates over a single socket and is exposed via a JavaScript interface in HTML 5 compliant browsers.
b. Once you get a Web Socket connection with the web server, you can send data from browser to server
by calling a send method, and receive data from server to browser by an onmessage event handler.
c. Both of the above.
d. None of the above.

Q111. Which value of Socket.readyState atribute of WebSocket indicates that the connection has not yet been
established?
a. 0 b. 1 c. 2 d. 3

Q112. Which value of Socket. readyState atribute of WebSocket indicates that the connection is established and
communication is possible?
a. 0 b. 1 c. 2 d. 3

Q113. Which value of Socket.readyState atribute of WebSocket indicates that the connection is going through
the closing handshake?
a. 0 b. 1 c. 2 d. 3

Q114. Which value of Socket.readyState atribute of WebSocket indicates that the connection has been closed or
could not be opened?
a. 0 b. 1 c. 2 d. 3
12
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

Q115. Which of the following is true about 'canvas' tag in HTML5?


a. HTML5 element <canvas> gives you an easy and powerful way to draw graphics using JavaScript.
b. It can be used to draw graphs, make photo compositions or do simple and not so simplea nimations.
c. Both of the above.
d. None of the above.

Q116. Which of the following is true about 'audio' tag in HTML5?


a. HTML5 supports <audio> tag which is used to embed sound content in an HTML or XHTML document.
b. The current HTML5 draft specification does not specify which audio formats browsers should support in
the audio tag.
c. Both of the above.
d. None of the above.

Q117. Which of the following is true about 'audio' tag in HTML5?


a. Commonly used audio formats ogg, mp3 and wav are supported.
b. You can use <source> tag to specify media along with media type and many other attributes.
c. An audio element allows multiple source elements and browser will use the first recognized format.
d. All of the above.

Q118. Which of the following is true about 'video' tag in HTML5?


a. HTML5 supports <video> tag which is used to embed a video file in an HTML or XHTML document.
b. The current HTML5 draft specification does not specify which video formats browsers should support in
the video tag.
c. Ogg files with Thedora video codec and Vorbis audio codec are supported.
d. All of the above.

Q119. Which of the following is true about 'video' tag in HTML5?


a. MPEG4 files with H.264 video codec and AAC audio codec are supported.
b. You can use <source> tag to specify media along with media type and many other attributes.
c. An video element allows multiple source elements and browser will use the first recognized format.
d. All of the above.

Q120. Which of the following is correct about geolocation api in HTML5?


a. HTML5 Geolocation API lets you share your location with your favorite web sites.
b. A Javascript can capture your latitude and longitude and can be sent to backend web server and do
fancy location-aware things like finding local businesses or showing your location on a map.
c. Today most of the browsers and mobile devices support Geolocation API.
d. All of the above.

Q121. Which of the following is correct about geolocation api in HTML5?


a. The geolocation APIs work with a new property of the global navigator object.
b. The geolocation object is a service object that allows widgets to retrieve information about the
geographic location of the device.
c. Both of the above.
d. None of the above.

Q122. Which of the following method returns a geolocation object in HTML5?


a. navigator.geolocation b. browser.geolocation c. API.geolocation d.None of the above.

13
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q123. Which of the following method retrieves the current geographic location of the user?
a. geolocation.getCurrentPosition b. geolocation.watchPosition
geolocation.clearPosition d. None of the above.

Q124. Which of the following method cancels an ongoing watchPosition call?


a. geolocation.getCurrentPosition b. geolocation.watchPosition
c. geolocation.clearPosition d. None of the above.

Q125. Which of the following is correct about web workers in HTML5?


a. Web Workers do all the computationally expensive tasks without interrupting the user interface and
typically run on separate threads.
b. Web Workers allow for long-running scripts that are not interrupted by scripts that respond to clicks or
other user interactions.
c. Web Workers allow long tasks to be executed without yielding to keep the page responsive.
d. All of the above.

Q126. Which of the following attribute specifies a keyboard shortcut to access an element in HTML5?
a. accesskey b. key c. contextmenu d. contextkey

Q127. Which of the following attribute specifies if the user can edit the element's content or not?
a. editable b. contenteditable c. contextmenu d. content

Q128. Which of the following attribute specifies the context menu for an element?
a. key b. contextcontent c. contextmenu d. context

Q129. Which of the following attribute specifies whether or not a user is allowed to drag an element?
a. drag b. content c. context d. draggable

Q130. Which of the following attribute is used to group elements?


a. item b. itemprop c. itemcheck d. itemgroup

Q131. Which of the following attribute is used to group items?


a. item b. itemprop c. itemcheck d. itemgroup

Q132. Which of the following attribute specifies if the element must have it's spelling or grammar checked?
a. item b. itemcheck c. spellcheck d. itemgroup

Q133. Which of the following attribute triggers event when the document goes offline?
a. offline b. off c. out d. onbeforeonload

Q134. Which of the following attribute triggers an abort event?


a. offline b. onabort c. abort d. onbeforeonload

Q135. Which of the following attribute triggers event after the document is printed?
a. offlineprint b. onprint c. onafterprint d. onbeforeprint

Q136. Which of the following attribute triggers event before the document loads?
a. offline b. onabort c. onload d. onbeforeonload

Q137. Which of the following attribute triggers event before the document is printed?

14
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
a. onbeforeprint b. onafterprint c. onprint d. beforeprint

Q138. Which of the following attribute triggers event when the window loses focus?
a. onbeforeload b. onblur c. onlostfocus d. lostfocus

Q139. Which of the following attribute triggers event when media can start play, but might has to stop for
buffering?
a. onbeforeplay b. onplay c. oncanplay d. oncanplaythrough

CSS
Q1. Which of the following is correct about CSS?
a. CSS is used to control the style of a web document in a simple and easy way.
b. You can write CSS once and then reuse same sheet in multiple HTML pages.
c. All of the above.

Q2. Which of the following is correct about CSS?


a. Style sheets allow content to be optimized for more than one type of device.
b. CSS can store web applications locally with the help of an offline catche.
c. Using CSS, we can view offline websites. The cache also ensures faster loading and better overall
performance of the website.
d. All of the above.

Q3. Which of the following is a component of CSS style rule?


a. Selector b. Property c. Value d. All of the above.

Q4. Which of the following selector matches all elements of a type?


a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The Class Selector

Q5. Which of the following selector matches the name of any element type?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The Class Selector

Q6. Which of the following selector matches a particular element only when it lies inside a particular element?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The Class Selector

Q7. Which of the following selector matches a element based on its class attribute?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The Class Selector

Q8. Which of the following selector matches a element based on its id?
a. The Id Selector b. The Universal Selector c. The Descendant Selector d. The Class Selector

Q9. How to apply a style to several specific element types?


a. Use the type selector with, delimiter b. Use the type selector with .delimiter
c. Use the ID selector with ; delimiter d. Use the ID selector with > delimiter
Q10. Which property applies a color to text?
a. text-color b. foreground-color c. background-color d. color

Q11. Which values for font-family property is valid?


a. Times New Roman, serif b. “Times New Roman", serif
15
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
c. Times New Roman; serif;zz d. “Times New Roman"; "serif";

Q12. What does the ID selector do?


a. Apply the style to a specific element b. Apply the style to all the elements
d. Apply the style to a group of elements d. Apply the style to elements of the same type

Q13. Which of the following is a way to associate styles with your HTML document?
a. Embedded CSS - The <style> Element b. Inline CSS - The style Attribute
c. Both of the above. d. None of the above.

Q14. Which of the following is a way to associate styles with your HTML document?
a. External CSS - The Element b. Imported CSS - @import Rule
c. Both of the above. d. None of the above.

Q15. Which of the following is a true about CSS style overriding?


a. Any inline style sheet takes highest priority. So, it will override any rule defined in tags or rules defined in
any external style sheet file.
b. Any rule defined in tags will override rules defined in any external style sheet file.
c. Any rule defined in external style sheet file takes lowest priority, and rules defined in this file will be
applied only when above two rules are not applicable.
d. All of the above.

Q16. Which of the following defines a measurement as a percentage relative to another value, typically an
enclosing element?
a. % b. cm c. em d. ex

Q17. Which of the following defines a measurement in centimeters?


a. % b. cm c. em d. ex

Q18. Which of the following defines a relative measurement for the height of a font in em spaces?
a. % b. cm c. em d. ex

Q19. Which of the following defines a measurement relative to a font's x-height?


a. % b. cm c. em d. ex

Q20. Which of the following defines a measurement in inches?


a. in b.mm c. pc d. pt

Q21. Which of the following defines a measurement in millimetre ?


a. in b. mm c. pc d. pt

Q22. Which of the following defines a measurement in picas?


a. in b. mm c. pc d. pt

Q23. Which of the following defines a measurement in points?


a. in b. mm c. pc d. pt

Q24. Which of the following defines a measurement in screen pixels?


a. px d. vh c. vw d. vmin

16
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q25. Which of the following defines 1% of viewport height?
a. px b. vh c. vw d. vmin

Q26. Which of the following is correct about Hex Code format of CSS colors?
a. The first two digitsRR represent a red value. b. The next two are a green valueGG.
c. The last are the blue valueBB. d. All of the above.

Q27. Which of the following is correct about Short Hex Code format of CSS colors?
a. This is a shorter form of the six-digit notation.
b. In this format, each digit is replicated to arrive at an equivalent six-digit value.
c. Each hexadecimal code will be preceded by a pound or hash sign '#'.
d. All of the above.

Q28. Which of the following is correct about RGB Values format of CSS colors?
a. This color value is specified using the rgb property.
b. This property takes three values, one each for red, green, and blue.
c. The value can be an integer between 0 and 255 or a percentage.
d. All of the above.

Q29. Which of the following is correct about Browser Safe Colors?


a. These are 216 colors which are supposed to be most safe and computer independent colors.
b. These colors vary from hexa code 000000 to FFFFFF.
c. These colors are safe to use because they ensure that all computers would display the colors
correctly when running a 256 color palette.
d. All of the above.

Q30. Which of the following property is used to set the background color of an element?
a. background-color b. background-image c. background-repeat d. background-position

Q31. Which of the following property is used to set the background image of an element?
a. background-color b. background-image c. background-repeat d. background-position

Q32. Which of the following property is used to control the repetition of an image in the background?
a. background-color b. background-image c. background-repeat d. background-position

Q33. Which of the following property is used to control the position of an image in the background?
a. background-color b. background-image c. background-repeat d. background-position

Q34. Which of the following property is used to control the scrolling of an image in the background?
a. background-attachment b. background c. background-repeat d. background-position

Q35. Which of the following property is used as a shorthand to specify a number of other background
properties?
a. background-attachment b. background c. background-repeat d. background-position

Q36. Which of the following property is used to change the face of a font?
a. font-family b. font-style c. font-variant d. font-weight

Q37. Which of the following property is used to make a font italic or oblique?
a. font-family b. font-style c. font-variant d. font-weight
17
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

Q38. Which of the following property is used to create a small-caps effect?


a. font-family b. font-style c. font-variant d. font-weight

Q39. Which of the following property is used to increase or decrease how bold or light a font appears?
a. font-family b. font-style c. font-variant d. font-weight

Q40. Which of the following property is used to increase or decrease the size of a font?
a. font-size b. font c. font-variant d. font-weight

Q41. Which of the following property is used as shorthand to specify a number of other font properties?
a. font-size b. font c. font-variant d. font-weight

Q42. Which of the following property is used to set the color of a text?
a. color b. direction c. letter-spacing d. word-spacing

Q43. Which of the following property is used to set the text direction?
a. color b. direction c. letter-spacing d. word-spacing

Q44. Which of the following property is used to add or subtract space between the letters that make up a word?
a. color b. direction c. letter-spacing d. word-spacing

Q45. Which of the following property is used to add or subtract space between the words of a sentence?
a. color b. direction c. letter-spacing d. word-spacing

Q46. Which of the following property is used to add or subtract space between the words of a sentence?
a. text-indent b. text-align c. text-decoration d. text-transform

Q47. Which of the following property is used to align the text of a document?
a. text-indent text-alignc c. text-decoration d. text-transform

Q48. Which of the following property is used to underline, overline, and strikethrough text?
a. text-indent b. text-align c. text-decoration d. text-transform

Q49. Which of the following property is used to capitalize text or convert text to uppercase or lowercase letters?
a. text-indent b. text-align c. text-decoration d. text-transform

Q50. Which of the following property is used to control the flow and formatting of text?
a. white-space b. text-shadow c. text-decoration d. text-transform

Q51. Which of the following property is used to set the text shadow around a text?
a. white-space b. text-shadow c. text-decoration d. text-transform

Q52. Which of the following property is used to set the width of an image border?
a. border b. height c. width d. moz-opacity

Q53. Which of the following property is used to set the height of an image?
a. border b. height c. width d. moz-opacity

18
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q54. Which of the following property is used to set the width of an image?
a. border b. height c. width d. moz-opacity

Q55. Which of the following property is used to set the opacity of an image?
a. border b. height c. width d. moz-opacity

Q56. Which of the following property of a anchor element signifies unvisited hyperlinks?
a. :link b. :visited c. :hover d. :active

Q57. Which of the following property of a anchor element signifies visited hyperlinks?
a. :link b. :visited c. :hover d. :active

Q58. Which of the following property of a anchor element signifies an element that currently has the user's
mouse pointer hovering over it?
a. :link b. :visited c. :hover d. :active

Q59.Which of the following property of a anchor element signifies an element on which the user is currently
clicking?
a. :link b. :visited c. :hover d. :active

Q60. Which of the following property of a table element specifies whether the browser should control the
appearance of the adjacent borders that touch each other or whether each cell should maintain its style?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells

Q61. Which of the following property of a table element specifies the width that should appear between table
cells?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells

Q62. Which of the following property of a table element controls the placement of the table caption?
a. :border-collapse b. :border-spacing c. :caption-side d.- :empty-cells

Q63. Which of the following property of a table element specifies whether the border should be shown if a cell
is empty?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells

Q64. Which of the following property of a table element allows browsers to speed up layout of a table by
using the first width properties it comes across for the rest of a column rather than having to load the
whole table before rendering it?
a. :table-layout b. :border-spacing c. :caption-side d. :empty-cells

Q65. Which of the following property specifies the color of a border?


a. :border-color b. :border-style c. :border-width d. :border-bottom-color

Q66. Which of the following property specifies whether a border should be solid, dashed line, double line, or
one of the other possible values?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color

Q67. Which of the following property specifies the width of a border?


a. :border-color b. :border-style c. :border-width d. :border-bottom-color

19
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q68. Which of the following property changes the color of bottom border?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color

Q69. Which of the following property changes the color of top border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-bottom-color

Q70. Which of the following property changes the color of left border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-bottom-color

Q71. Which of the following property changes the color of right border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-bottom-color

Q72. Which of the following property changes the style of bottom border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-right-style

Q73. Which of the following property changes the style of top border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-right-style

Q74. Which of the following property changes the style of left border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-right-style

Q75. Which of the following property changes the style of right border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-right-style

Q76. Which of the following property changes the width of bottom border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-right-width

Q77. Which of the following property changes the width of top border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-right-width

Q78. Which of the following property changes the width of left border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-right-width

Q79. Which of the following property changes the width of right border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-right-width

Q80. Which of the following property specifies a shorthand property for setting the margin properties in one
declaration?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left

Q81. Which of the following property specifies the bottom margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left

Q82. Which of the following property specifies the top margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left

Q83. Which of the following property specifies the left margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left

Q84. Which of the following property specifies the right margin of an element?
20
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
a. :margin-right b. :margin-bottom c. :margin-top d. :margin-left

Q85. Which of the following property allows you to control the shape or appearance of the marker of a list?
a. list-style-type b. list-style-position c. list-style-image d. list-style

Q86. Which of the following property specifies whether a long point that wraps to a second line should align
with the first line or start underneath the start of the marker of a list?
a. list-style-type b. list-style-position c. list-style-image d. list-style

Q87. Which of the following property specifies an image for the marker rather than a bullet point or number?
a. list-style-type b. list-style-position c. list-style-image d. list-style

Q88. Which of the following property serves as shorthand for the marker properties?
a. list-style-type b. list-style-position c. list-style-image d. list-style

Q89. Which of the following property specifies the distance between a marker and the text in the list?
a. marker-offset b. list-style-position c. list-style-image d. list-style

Q90. Which of the following property specifies the bottom padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right

Q91. Which of the following property specifies the top padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right

Q92. Which of the following property specifies the left padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right

Q93. Which of the following property specifies the right padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right

Q94. Which of the following property serves as shorthand for the padding properties?
a. padding b. padding-top c. padding-left d. padding-right

Q95. Which of the following value of cursor shows it as crosshair or plus sign?
a. crosshair b. default c. pointer d. move
Q96. Which of the following value of cursor shows it as an arrow?
a. crosshair b. default c. pointer d. move

Q97. Which of the following value of cursor shows it as a pointing hand?


a. crosshair b. default c. pointer d. move

Q98. Which of the following value of cursor shows it as the 'I' bar?
a. crosshair b. default c. pointer d. move

Q99. What does CSS stand for?


a. Creative Style Sheets b. Computer Style Sheets c. Cascading Style Sheets d. Cascade Style Sheets
e. Colorful Style Sheets

Q100. Where in an HTML document is the correct place to refer to an external style sheet?
21
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
In the <body> section
a. At the end of the document b. At the top of the document
c. In the <head> section d. Between head and body

Q101. Which HTML tag is used to define an internal style sheet?


a. css b. text/style c. style d. script

Q102. Which HTML attribute is used to define inline styles?


a. font b. styles c. css d. text e. style
Q103. Which is the correct CSS syntax?
a. body {color: black} b. body:color=black c. {body:color=black(body} d. {body;color:black}

Q104. How do you insert a comment in a CSS file?


a. /*this is a comment */ b. ‘this is a comment c. // this is a comment// b. //this is a comment

Q105. Which property is used to change the background color?


a. bgcolor: b. background-color: c. color:

Q106. How do you add a background color for all "<h1>" elements?
a. all.h1 {background-color:#FFFFFF} b. h1.all {background-color:#FFFFFF} c. h1 {background-
color:#FFFFFF}

Q107. How do you change the text color of an element?


a. text-color: b. color: c. text-color= d. font-color:

Q108. Which CSS property controls the text size?


a. font-style b. text-style c. font-size d. text-size

Q109. What is the correct CSS syntax for making all the <p> elements bold?
a. p {text-size:bold} b. p {font-weight:bold} c. style:bold d. p{font:bold}

Q110. How do you display hyperlinks without an underline?


A. a {decoration:no underline}
B. a {text-decoration:no underline}
C. a {underline:none}
D. a {text-decoration:none}

Q111. How do you make each word in a text start with a capital letter
a. text-transform:uppercase b. text-transform:capitalize c. You can't do that with CSS

Q112. How do you change the font of an element?


a. fon-face: b. font-family: c. f: d. font-style:

Q113. How do you make the text bold?


a. font:b b. style:bold c. font-weight:bold

Q114. How do you display a border like this: The top border = 10 pixels, The bottom border = 5 pixels, The left
border = 20 pixels, The right border = 1pixel?
a. border-width:10px 20px 5px 1px b. border-width:10px 1px 5px 20px
c. border-width:10px 5px 20px 1px d. border-width:5px 20px 10px 1px

22
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q115. How do you change the left margin of an element?
a. padding: b. indent: c. margin: d. text-indent: e. margin-left:

Q116. To define the space between the element's border and content, you use the padding property, but are
you allowed to use negative values?
a. Yes b. No

Q117. How do you make a list that lists its items with squares?
a. type: square b. list-style-type: square c. list-type: square d. style-list: square

Q118. What is the correct HTML for referring to an external style sheet?
A. <link rel="stylesheet" type="text/css" href="mainstyle.css">
B. <style src="mainstyle.css">
C. <stylesheet>mainstyle.css</stylesheet>
D. <link url="stylesheet" type="text/css" href="mainstyle.css">
Q119. What is the correct CSS syntax for making all the <p> elements bold?
a. p {font-weight:bold} b. p {text-size:bold}
c. <p style="text-size:bold"> d.<p style="font-size:bold">

Q120. How do you make each word in a text start with a capital letter?
a. text-transform:capitalize b. text-transform:uppercase c. You can't do that with CSS

Q121. What are the three methods for using style sheets with a web page
a. Dreamweaver, GoLive or FrontPage
b. Inline, embedded or document level and external
c. Handcoded, Generated or WYSIWYG

Q122. Which of the following styles is recommended?


a. In-Line styles b. External styles c. Embedded styles d. Multiple styles

Q113. In what form are style rules presented?


a. selector { property: value } b. selector { property= value }
c. selector ( property: value ) d. selector ( property= value )

Q114. What selector should you use when applying a style to multiple elements?
a. ID b. Class c. Type d. Any of the above

PHP
Q1. What PHP stands for?
a. Hypertext Preprocessor b. Pre Hypertext Processor c. Pre Hyper Processor d. Pre Hypertext Process

Q2. Which of the following tags is not a valid way to begin and end a PHP code block?
a. <% %> b. <? ?> c. <?php ?> d. <! !>

Q3. How does the identity operator === compare two values?
a. It converts them to a common compatible data type and then compares the resulting values
b. It returns True only if they are both of the same type and value
c. If the two values are strings, it performs a lexical comparison
23
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
d. It bases its comparison on the C strcmp function exclusively
e. It converts both values to strings and compares them

Q4. Variables always start with a ........ in PHP


a. Pond-sign b. Yen-sign c. Dollar-sign d. Euro-sign

Q5. What is the value displayed when the following is executed? Assume that the code was executed using
the following URL:
testscript.php?c=25
<?php
function process($c, $d = 25)
{
global $e;
$retval = $c + $d - $_GET['c'] - $e;
return $retval;
}
$e = 10;
echo process(5);
?>
a. 25 b. -5 c. 10 d. 5 e. 0

Q6. PHP is an open source software


a. True b. False
Q7.Which of the following is not valid PHP code?
a. $_10 b. ${“MyVar”} c. &$something d. $10_somethings e. $aVaR

Q8.PHP runs on different platforms (Windows, Linux, Unix, etc.)


a. True b. False

Q9. Array values are keyed by ______ values (called indexed arrays) or using ______ values (called
associative arrays). Of course, these key methods can be combined as well.
a. Float, string b. Positive number, negative number
c. Even number, string d. String, Boolean e. Integer, string

Q10. What will the following script output?


<?php
$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);
$sum = 0;
for ($i = 0; $i < 5; $i++) {
$sum += $array[$array[$i]];
}
echo $sum;
?>
a. 78 b. 19 c. NULL d. 5 e. 0

Q11. What elements will the following script output?


<?php
$array = array (true => 'a', 1 => 'b');
Var_dump ($array);
?>

24
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
a. 1 => 'b' b. True => 'a', 1 => 'b' c. 0 => 'a', 1 => 'b' d. None e. It will output NULL

Q12.There are three different kind of arrays:


a. Numeric array, String array, Multidimensional array
b. Numeric array, Associative array, Dimensional array
c. Numeric array, Associative array, Multidimensional array
d. Const array, Associative array, Multidimensional array

Q13. Assume you would like to sort an array in ascending order by value while preserving key associations.
Which of the following PHP sorting functions would you use?
a. ksort() b. asort() c. krsort() d. sort() e. usort()

Q14. What function computes the difference of arrays?


a. array_diff b. diff_array c. arrays_diff d. diff_arrays

Q15. What functions count elements in an array?


a. count b. Sizeof c. Array_Count d. Count_array

Q16. What array will you get if you convert an object to an array?
a. An array with properties of that object as the array's elements.
b. An array with properties of that array as the object's elements.
c. An array with properties of that object as the Key elements.
d. An array with keys of that object as the array's elements.

Q17. How do you write “Hello World” in PHP


a. “Hello World”; b. echo “Hello World”; c. Document.Write d.(“Hello World”);

Q18. What is the correct way to end a PHP statement?


a. New Line b. ; c. . d. </php>

Q19.The PHP syntax is most similar to:


a. VBScript b. JavaScript c. Perl and C

Q20.How do you get information from a form that is submitted using the “get” method?
a. Request.Form; b. $_GET[]; c. Request.QueryString

Q21. When using the POST method, the variables are displayed in the URL:
a. False b. True

Q22. In PHP you can use both single quotes ( ‘ ‘ ) and double quotes ( “ “ ) for strings:
a. True b. False

Q23. Include files must have the file extension “.inc”


a. True b. False

Q24. What is the correct way to include the file “time.inc”?


a. <% include file= “time.inc” % > b. <?php jnclude_file(“time.inc”); ?>
c. <?php require(“time.inc”); ?> d. <!- - include file= “time.inc”- - >

25
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q25.What is the correct way to create a function in PHP?
a. create myFunction() b. new_function myFunction( ) c. function myFunction( )

Q26. What is the correct way to open the file “time.txt” as readable?
a. open(“time,txt”, “read”); b. open(“time.txt”); c. fopen(“time.txt”, “r”); d. fopen(“time.txt”,
“r+”);

Q27. PHP allows you to send emails directly from a script


a. False b. True

Q28. What is the correct way to add 1 to the $count variable?


a. $count+ +; b. + + count c. $count = +1 d. count+ +;
Q30. What is a correct way to add a comment in PHP?
a. <comment>…</comment> b. /*…*/ c. *\..\* d. <!- - …- - >

Q31.PHP can be run on Microsoft Windows IIS (Internet Information Server):


a. True b . False

Q32. Which of the following is correct about PHP?


a. PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
b. PHP is a server side scripting language that is embedded in HTML.
c. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites.
d. All of the above.

Q33. Which of the following is correct about PHP?


a. PHP performs system functions, i.e. from files on a system it can create, open, read, write, and close them.
b. PHP can handle forms, i.e. gather data from files, save data to a file, thru email you can send data, return data to
the user.
c. You add, delete, modify elements within your database thru PHP.
d. All of the above.

Q34. Which of the following is correct about PHP?


a. PHP can access cookies variables and set cookies.
b. Using PHP, you can restrict users to access some pages of your website.
c. It can encrypt data.
d. All of the above.

Q35. Using which of the following way can you embed PHP code in an HTML page?
a. <?php PHP code goes here ?> b. <? PHP code goes here ?>
c. <script language="php"> PHP code goes here </script> d. All of the above.

Q36. Which of the following is true about php.ini file?


a. The PHP configuration file, php.ini, is the final and most immediate way to affect PHP's functionality.
b. The php.ini file is read each time PHP is initialized. c. Both of the above. d. None of the above.

Q37. Which of the following is true about php.ini file?


a. The PHP configuration file, php.ini, is the final and most immediate way to affect PHP's functionality.
b. The php.ini file is read each time PHP is initialized. C. Both of the above. d. None of the above.

26
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q38. Is PHP whitespace sensitive?
a. false b. true

Q39. Is PHP case sensitive?


a. false b. true

Q40. Which of the following is true about php variables?


a. All variables in PHP are denoted with a leading dollar sign ($).
b. The value of a variable is the value of its most recent assignment.
c. Variables are assigned with the = operator, with the variable on the left-hand side and the expression to be
evaluated on the right.
d. All of the above.

Q41. Which of the following is true about php variables?


a. Variables can, but do not need, to be declared before assignment.
b. Variables in PHP do not have intrinsic types - a variable does not know in advance whether it will be used
to store a number or a string of characters.
c. Both of the above..
d. All of the above.
Q42. Which of the following type of variables are whole numbers, without a decimal point, like 4195?
a. Integers b. Doubles c. Booleans d. Strings

Q43. Which of the following type of variables are floating-point numbers, like 3.14159 or 49.1?
a. Integers b. Doubles c. Booleans d. Strings

Q44. Which of the following type of variables have only two possible values either true or false?
a. Integers b. Doubles c. Booleans d. Strings

Q45. Which of the following type of variables are special type that only has one value: NULL?
a. Strings b. Doubles c. Booleans d. NULL

Q46. Which of the following type of variables are sequences of characters, like 'PHP supports string operations.'?
a. Strings b. Arrays c. Objects d. Resources

Q47. Which of the following type of variables are named and indexed collections of other values?
a. Strings b. Arrays c. Objects d. Resources

Q48. Which of the following type of variables are instances of programmer-defined classes?
a. Strings b. Arrays c. Objects d. Resources

Q49.Which of the following type of variables are special variables that hold references to resources external to
PHP (such as database connections)?
a. Strings b. Arrays c. Objects d. Resources

Q50. Which of the following is correct about variable naming rules?


a. Variable names must begin with a letter or underscore character.
b. A variable name can consist of numbers, letters, underscores.
c. you cannot use characters like + , - , % , ( , ) . & , etc in a variable name.
27
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
d. All of the above.

Q51. Which of the following is correct about determine the "truth" of any value not already of the Boolean type?
a. If the value is a number, it is false if exactly equal to zero and true otherwise.
b. If the value is a string, it is false if the string is empty (has zero characters) or is the string "0", and is true
otherwise.
c. Values of type NULL are always false.
d. All of the above.

Q52.Which of the following is correct about determine the "truth" of any value not already of the Boolean type?
a. If the value is an array, it is false if it contains no other values, and it is true otherwise. For an object,
containing a value means having a member variable that has been assigned a value.
b. Valid resources are true (although some functions that return resources when they are successful will return
FALSE when unsuccessful).
c. Don't use double as Booleans.
d. All of the above.

Q53. Which of the following is correct about NULL?


a. NULL is a special type that only has one value: NULL.
b. The special constant NULL is capitalized by convention, but actually it is case insensitive.
c. Both of the above. d. None of the above.

Q54. Which of the following is correct about NULL?


a. A variable that has been assigned NULL evaluates to FALSE in a Boolean context.
b. A variable that has been assigned NULL returns FALSE when tested with IsSet() function.
c. Both of the above. d. None of the above.

Q55. Which of the following is correct about constants?


a. To define a constant you have to use define() function.
b. To retrieve the value of a constant, you have to simply specify its name.
c. Both of the above. d. None of the above.

Q56. Which of the following is correct about constants?


a. Unlike with variables, you do not need to have a constant with a $.
b. Only scalar data (boolean, integer, float and string) can be contained in constants.
c. Both of the above. d. None of the above.

Q57.Which of the following function returns selected parts of an array?


a. array_reverse() b. array_search() c. array_shift() d. array_slice()

Q58. Which of the following function returns the sum of the values in an array?
a. array_sum() b. array_splice() c. array_udiff() d. array_udiff_assoc()

Q59.Which of the following function checks if a specified value exists in an array?


a. extract() b. in_array() c. key() d. krsort()

Q60. Singly quoted strings are treated almost literally, whereas doubly quoted strings replace variables with their
values as well as specially interpreting certain character sequences.
a. true b. false

28
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q61. Doubly quoted strings are treated almost literally, whereas singly quoted strings replace variables with their
values as well as specially interpreting certain character sequences.
a. true b. false

Q62. How will you concatenate two strings?


a. Using . operator. b. Using + operator. c. Using add() function d. Using append() function

Q63. If there is any problem in loading a file then the require() function generates a warning but the script will
continue execution.
a. true b. false

Q64. If there is any problem in loading a file then the include() function generates a warning but the script will
continue execution.
a. true b. false

Q65. Which of the following function opens a file?


a. fopen() b. fread() c. filesize() d. file_exist()

Q66. Which of the following function is used to read the content of a file?
a. fopen() b. fread() c. filesize() d. file_exist()

Q67. Which of the following function is used to get the size of a file?
a. fopen() b. fread() c. filesize() d. file_exist()

Q68. Which of the following function is used to check if a file exists or not?
a. fopen() b. fread() c. filesize() d. file_exist()

Q69. Can you assign the default values to a function parameters?


a. true b. false

Q70.Which of the following is used to set cookies?


a. setcookie() function b. $_COOKIE variable c. $HTTP_COOKIE_VARS variable d. isset() function

Q71. Which of the following is used to get cookies?


a. getcookie() function b. $_COOKIE variable c. isset() function d. None of the above.
Q72. Which of the following is used to check that a cookie is set or not?
a. getcookie() function b. $_COOKIE variable c. isset() function d. None of the above.

Q73. Which of the following is used to delete a cookie?


a. setcookie() function b. $_COOKIE variable c. isset() function d. None of the above.

Q74. Which of the following is used to create a session?


a. session_start() function b. $_SESSION[] c. isset() function d. session_destroy() function

Q75. Which of the following is used to access session variables in PHP?


a. session_start() function b. $_SESSION[] c. isset() function d. session_destroy() function

Q76. Which of the following is used to check if session variable is already set or not in PHP?
a. session_start() function b. $_SESSION[] c. isset() function d. session_destroy() function
29
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

Q77. Which of the following is used to destroy the session?


a. session_start() function b. $_SESSION[] c. isset() function d. session_destroy() function

Q78. Which of the following provides access to the uploaded file in the temporary directory on the web server?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']['size'] d. $_FILES['file']['type']

Q79. Which of the following provides the actual name of the uploaded file?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']['size'] d. $_FILES['file']['type']

Q80.Which of the following provides the size of the uploaded file in PHP?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']['size'] d. $_FILES['file']['type']

Q81. Which of the following provides content type of the uploaded file in PHP?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']['size'] d. $_FILES['file']['type']

XML
Q1. What does XML stand for?
a. Example Markup Language b. X-Markup Language
c. extensible Markup Language d. eXtra Modern Link

Q2. There is a way of describing XML data, how?


a. XML uses a DTD to describe the data
b. XML uses a description node to describe data
c. XML uses XSL to describe data

Q3. XML’s goal is to replace HTML


a. False b. True

Q4. What is the correct syntax of the declaration which defines the XML version?
a. <xml version= “1.0”/> b. <?xml version= “1.0”/> c. <?xml version = “1.0”?>

Q5. What does DTD stand for?


a. Dynamic Type Definition b. Direct Type Definition
c. Document Type Definition d. Do the Dance

Q6. Is this a “well formed” XML document?


<?xml version= “1.0”?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don’t forget me this weekend!</body>
</note>
a. No b.Yes

30
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q7. Is this a “well formed” XML document?
<?xml version= “1.0”?>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don’t forget me this weekend!</body>
a. No b. Yes

Q8. Which statement is true?


a. All XML documents must have a DTD b. All XML elements must be lower case
c. All XML elements must be properly closed d. All the statements are true

Q9. Which statement is true?


a. XML tags are case sensitiv b. XML documents must have a root tag
c. XML elements must be properly nested d. All the statements are true

Q10. XML preserves white spaces


a. True b. False

Q11. Is this a “well formed” xml document?


<?xml version= “1.0”?>
<note>
<to age= “29”>Tove</to>
<from>Jani</from>
</note>
a. Yes b. No

Q12. Is this a “well formed” xml document?


<?xml version= “1.0”?>
<note>
<to age= 29>Tove</to>
<from>Jani</from>
</note>
a. Yes b. No

Q13. XML elements cannot be empty


a. False b. True

Q14. Which is not a correct name for an XML element?


a. <Note> b. All 3 names are incorrect c. <1 dollar> d. <h1>

Q15. Which is not a correct name for an XML element?


a. <NAME> b. <first name> c. <age> d. All 3 names are incorrect

Q16. Which is not a correct name for an XML document?


a. <xmldocument> b. <phone number> c. All 3 names are incorrect d. <7eleven>

Q17. XML attribute values must always be enclosed in quotes


a. False b. True

31
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

Q18. What does XSL stand for?


a. eXtra Style Language b. eXtensible Style Listing
c. eXpandable Style Language d. eXtensible Stylesheet Language

Q19. What is a correct way of referring to a stylesheet called “mystyle.xsl”?


a. <stylesheet type= “text/xsl” href= “mystyle.xsl”/>
b. <link type="text/xsl" href="mystyle.xsl" />
c. <?xml-stylesheet type="text/xsl" href="mystyle.xsl" ?>

Q20. For the XML parser to ignore a certain section of your XML document, which syntax is
correct?
a. <CDATA> Text to be ignored </CDATA> b. <![CDATA[ Text to be ignored ]]>
c. <xml:CDATA[ Text to be ignored ]> d. <PCDATA> Text to be ignored </PCDATA>

Q21. Which statement is true?


a. All the statements are true b. All XML elements must have a closing tag
c. All XML elements must be lower case d. All XML documents must have a DTD

Q22. Is it easier to process XML than HTML?


a. Yes b. No c. Sometimes d. Cant say

Q23. Which of the following programs support XML or XML applications?


a. Internet Explorer 5.5 b. Netscape 4.7 c. RealPlayer. d. both 1 and 2

Q24. Kind of Parsers are


a. well-formed b. well-documented c. non-validating and validating d. none of the above

Q25. Well formed XML document means


a. it contains a root element
b. it contain an element
c. it contains one or more elements
d. must contain one or more elements and root element must contain all other elements

Q26. Comment in XML document is given by


a. <?-- --> b. <!-- --!> c. <!-- --> d. </-- -- >

Q27. Which of the following strings are a correct XML name?


a. _myElement b. my Element c. #myElement d. None of the above

Q28. Which of the following XML fragments are well-formed?


a. <?xml?> b. <?xml version="1.0"?>
c. <?xml encoding="JIS"?> d. <?xml encoding="JIS" version="1.0"?>

Q29.Valid XML document means (most appropriate)


a. the document has root element
b. the document contains atleast one or more root element
c. the XML document has DTD associated with it & it complies with that DTD
d. Each element must nest inside any enclosing element property

32
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
Q30. XML uses the features of
a. HTML b. XHTML c. VML d. SGML

Q31. Which of the following XML documents are well-formed?


a. <firstElement>some text goes here
<secondElement>another text goes here</secondElement>
</firstElement>
b. <firstElement>some text goes here</firstElement>
<secondElement> another text goes here</secondElement>
c. <firstElement>some text goes here
<secondElement> another text goes here</firstElement>
</secondElement>
d. </firstElement>some text goes here
</secondElement>another text goes here<secondElement>
<firstElement>

Q32. To use the external DTD we have the syntax


a. <?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
b. <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
c. <?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT “order.dtd”?>
d. <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>

Q33. The syntax for parameter entity is


a, <! ENTITY % NAME DEFINITION> b. < ENTITY % NAME DEFINITION>
c. <! ENTITY $ NAME DEFINITION> d. < ENTITY % NAME DEFINITION>

Q34. Which of the following XML fragments are well-formed?


a. <myElement myAttribute="someValue"/> b. <myElement myAttribute=someValue/>
c. <myElement myAttribute=’someValue’> d. <myElement myAttribute="someValue’/>
Q35. how to include external dtd in xml file
a. <!DOCTYPE rootnode SYSTEM "name of dtd file"> b. <!DOCTYPE childnode SYSTEM "name of dtd file">
c. <!DOCTYPE rootnode src="name of dtd file"> d. <!DOCTYPE SYSTEM "name of dtd file">

JSON
Q1. JSON stands for
a. java source object notes b. javascript object notation c. javascript orientation d. none

Q2.JSON is
a. language and platform independent b. language dependent and platform independent
c. language independent and platform dependent d. none

Q3. Json is used to


a. Transfer data as key value pair b. Transfer data as image c. Transfer data as arraylist d. None
33
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

Q4.To send data as Jason in php we use


a. json_encode(); b. encode_json() c. parsejson d. none

Q5.To read json data received from server javascript use


a. parseJSON(); b. parseHTML(); c. parseOBJECT() d. none

AJAX
Q1. Using AJAX we can make our web page
a. More inactive and faster b. Easy to connect web page with server
c. more dynamic d. none

Q2. XML Http Request object is a part of


a. W3C andard b. DOM Level 3 c. both 1 and 2 d. none

Q3. AJAX is combination of


a. java+css+xml b. java+css+DOM+xml c. avascript+css+DOM+XMLHttpRequest

Q4. What is AJAX?


a. AJAX = Asynchronous JavaScript and XML. b. AJAX = Asynchronous rquest and XML.
c. AJAX = Asynchronous JavaScript and HTML d. None

Q5. Ajax request pass through total how many readystate


a. 5 b. 4 c. 3 d. none

Q6. which Ajax property is used to read data from server


a. responseText b. responsetext c. responsedata d. none

Q7. Which method of Ajax hit server


a. send b. Hit c. Go d. none

Web Security
Q1. What is XSS stands for
a) Cross Site Scripting b) Extended site security c) None

Q2. ____ commonly targets scripts embedded in a page which are executed on the client-side (in the user’s
web browser) rather than on the server-side
a) XSS b) SQL Injection c) None

Q3. attack by which fraudsters impersonate a legitimate company and attempt to steal people’s personal
information or login credentials is called
a) Phishing email b) SQL Injection c) None

Q4. When developers fail to protect their users sensitive information such as user names, passwords, and
session tokens there is a possibility of _________.
34
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
a) SQL Injection
b) Insecure Direct Object Reference
c) Cross-Site Request Forgery
d) Broken Authentication and Session Management

Q5. A security measure to stop unauthorized access to documents is:


a) Network access control. c) Business continuity/disaster recovery.
b) Physical access restrictions. d) Backup/restore.

Q6. What is an example of vulnerabilities in web-based programs and environments?


A. SQL injection B. Cross-site scripting C. All of the above D. None of the above

Q7. CSRF is stand for


A. Cross-Site Request Forgery B. Cross script format
C. Cascading script format D. Cross site required format

Q8. the placement of malicious code in SQL statements, via web page input. Is called
a. SQL injection b. Cross-Site Request Forgery c. None

Q9. Phishing is form of___


A.Spamming B.Identity Theft C.Impersonation

Q10. Sniffing is used to perform___


A. Passive stack B. Active stack C. None

Q11. What is the best statement for taking advantage of a weakness in the security of an IT System
A.Threat B. Attack C. Vulnerability

UI
1) Which of the following is correct about Bootstrap?
a. Bootstrap is a sleek, intuitive, and powerful, mobile first front-end framework for faster andeasier web
development.
b. It uses HTML, CSS and Javascript.
c. Bootstrap was developed by Mark Otto and Jacob Thornton at Twitter.
d. All of the above.

2) Which of the following is correct about Bootstrap?


a. Bootstrap's responsive CSS adjusts to Desktops,Tablets and Mobiles.
b. Provides a clean and uniform solution for building an interface for developers.
c. It contains beautiful and functional built-in components which are easy to customize.
d. All of the above.

3) Which of the following is a part of Mobile First Strategy of Bootstrap?


a. Content: Determine what is most important.
b. Layout: Design to smaller widths first. Base CSS address mobile device first; media queriesaddress for tablet,
desktops.
c. Progressive Enhancement: Add elements as screen size increases.
d. All of the above.
35
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank

4) Which of the following is correct about Bootstrap Grid System?


a. Rows must be placed within a .container class for proper alignment and padding.
b. Use rows to create horizontal groups of columns.
c. Content should be placed within the columns, and only columns may be the immediate childrenof rows.
d. All of the above.

5) Which of the following is correct about Bootstrap Grid System?


a. Predefined grid classes like .row and .col-xs-4 are available for quickly making grid layouts. LESSmixins can
also be used for more semantic layouts.
b. Columns create gutters (gaps between column content) via padding. That padding is offset inrows for the
first and the last column via negative margin on .rows.
c. Grid columns are created by specifying the number of twelve available columns you wish tospan. For
example, three equal columns would use three .col-xs-4.
d. All of the above.

6) Which of the following is correct about Bootstrap Media Query?


a. It simply applies some CSS, based on certain conditions set forth. If those conditions are met,the style is
applied.
b. Both of the above.
c. None of the above.

7) Which of the following is correct about Bootstrap Media Query?


a. Media queries have two parts, a device specification and then a size rule.
b. Media Queries in Bootstrap allow you to move, show and hide content based on the viewportsize.
c. Both of the above.
d. None of the above.

8) Which of the following is correct about Bootstrap Mobile First Strategy?


a. You need to add the viewport meta tag to the element, to ensure proper rendering and touch zooming on
mobile devices.
b. width property controls the width of the device. Setting it to device-width will make sure thatit is rendered
across various devices (mobiles,desktops,tablets...) properly.
c. initial-scale=1.0 ensures that when loaded, your web page will be rendered at a 1:1 scale, andno zooming
will be applied out of the box.
d. All of the above.
9) Which of the following is correct about Bootstrap Responsive Images?
a. Bootstrap 3 allows you to make the images responsive by adding a class ..img-responsive tothe <.img> tag.
b. ..img-responsive class applies max-width: 100%; and height: auto; to the image so that itscales nicely to the
parent element.
c. Both of the above.
d. None of the above.

10) Which of the following is correct about Bootstrap cross browser consistency?
a. Bootstrap uses Normalize to establish cross browser consistency.
b. Normalize.css is a modern, HTML5-ready alternative to CSS resets.
c. Normalize.css is a small CSS file that provides better cross-browser consistency in the defaultstyling of HTML
elements.
d. All of the above.

36
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
11) Which of the following class styles a table as a nice basic table with just some light padding and horizontal
dividers?
A. table B. table-striped C. table-bordered D. table-hover

12) Which of the following class styles a table as a nice basic table with stripes on rows?
A. table B. table-striped C. table-bordered D. table-hover

13) Which of the following class styles a table with borders surrounding every element and rounded corners
around the entire table?
A. table B. table-striped C. table-bordered D. table-hover

14) Which of the following class styles a table with a light gray background to rows while the cursor hovers over
them?
A. table B. table-striped C. table-bordered D. table-hover

15) Which of the following class applies the hover color to a particular row or cell of a table?
A. active B. success C. warning D. danger

16) Which of the following class indicates a successful or positive action?


A. active B. success C. warning D. danger

17) Which of the following class indicates a warning that might need attention?
A. active B. success C. warning D. danger

18) Which of the following class indicates a dangerous or potentially negative action?
A. active B. success C. warning D. danger

19) Which of the following class can be used to create a responsive table?
A. table-responsive B. responsive C. active D. table

20) Which of the following is the default layout of a bootstrap form?


A. vertical B. inline C. horizontal D. None of the above.

21) Which of the following class is required to be added to form tag to make it inline?
A. inline B. form-inline C. horizontal D. None of the above.

22) Which of the following class is required to be added to form tag to make it horizontal?
A. horizontal B. form-horizontal C. horizontal D. None of the above.

23) Which of the following is true about bootstrap help text?


a. Bootstrap form controls can have a block level help text that flows with the inputs.
b. To add a full width block of content, use the .help-block after the <input>.
c. Both of the above.
d. None of the above.
24) Which of the following bootstrap style of button creates a default/ standard button?
A.btn B. btn-primary C. btn-success D. btn-info

25) Which of the following bootstrap style of button provides extra visual weight and identifies the primary
action in a set of buttons?
37
Vidyanidhi Info Tech Academy
Vidyanidhi Info Tech Academy
PG DAC Question Bank
A.btn B. btn-primary C. btn-success D. btn-info

38
Vidyanidhi Info Tech Academy

You might also like