[go: up one dir, main page]

0% found this document useful (0 votes)
602 views49 pages

WT MCQ For Insem

This document contains a multiple choice quiz with questions about HTML, CSS, XML, and JavaScript. There are 70 questions total across three units that cover topics such as HTML tags, attributes, colors, links, tables, forms, XML structure and validation, CSS properties, and JavaScript event handling. The questions test knowledge of vocabulary, syntax, and concepts for these languages and technologies used to build web pages.

Uploaded by

poi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
602 views49 pages

WT MCQ For Insem

This document contains a multiple choice quiz with questions about HTML, CSS, XML, and JavaScript. There are 70 questions total across three units that cover topics such as HTML tags, attributes, colors, links, tables, forms, XML structure and validation, CSS properties, and JavaScript event handling. The questions test knowledge of vocabulary, syntax, and concepts for these languages and technologies used to build web pages.

Uploaded by

poi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

WT MCQ (UNIT 1,2&3) Prepared By: A.P.

Singh

UNIT 1
1. ____ is used to store the data within the documents on the
server.
(A) XML
(B) HTML
(C) DHTML
(D) CG
Ans: A
2. The tag used to add images to the HTML document is ____
(A) <FONT>
(B) <HR>
(C) <HI>
(D) <IMG>
Ans: D
3. The HTML and HTTP standard are defined by ____
(A) Web client
(B) Internet association
(C) WWW consortium
(D) WWW
Ans: C
4. The <Font> tag is similar to ____
(A) <BIG>tag
(B) <SMALL>tag
(C) <MARQUEE>tag
(D) <BIG>and<Small> tags
Ans: D
5. Which language is used for creating Web Pages?
(A) PASCAL
(B) C
(C) HTML
(D) BASIC
Ans: C
6. What is the abbreviation of HTTP?
(A) Hypertext tag path
(B) Hyper Text Transfer Protocol
(C) Hypertext transfer path
(D) None
Ans: B
7. HTML document should begin with the ____
(A) <HEAD> tag
(B) <TITLE> tag
(C) <BODY> tag
(D) <HTML> tag
Ans: D
8. GIF is the abbreviation for ___
(A) Graphics Interchange Format
(B) Graphics Instruction Format
(C) Graphics Item Format
(D) Graphics Information Format
Ans: A
9. A popular way of linking many documents was ___
(A) Notepad
(B) SGML
(C) Gopher
(D) Computer
Ans: C
10. Who send the requisition for web pages to the web servers?
(A) Node
(B) System
(C) Web clients
(D) Web customer
(D) Computer
Ans: C
11. Which tag is used to identify the author’s name of the web
document?
(A) Anchor tag
(B) Meta tag
(C) Title tag
(D) Font tag
Ans: B
12. Which attribute can be used to change the color of the links?
(A) Link
(B) ALINK
(C) VLINK
(D) All the above
Ans: D
13. Which indicates the beginning of an effect?
(A) Start tag
(B) End tag
(C) Tag
(D) None of the given
Ans: A
14. Which option on the menu can be used to insert rows and
columns?
(A) Insert
(B) Tool
(C) Table
(D) Format Ans: C
15. Which of the following achieves the effect of using script
language?
(A) DHTML
(B) XML
(C) HTML
(D) CGI
Ans: A
16. Forms are created by the attributes
(A) Action and Method
(B) Value and Method
(C) Method and Target
(D) Action and Target
Ans: A
17. Name any one text editor program.
(A) HTML
(B) FrontPage
(C) Notepad
(D) MS Paint
Ans: C
18. Which section of the Web page will contain Meta tags?
(A) Body section
(B) Heading section
(C) (a) or (b)
(D) None
Ans: C
19. What are the two segments of a style tag?
(A) Selector and property
(B) Name and content
(C) Head section and body section
(D) None
(D) Action and Target
Ans: A
20. ____ attribute is used to display an alternate message.
(A) Size
(B) ALT
(C) ALIGN
(D) SRC
Ans: B
21. Check boxes are used _____
(A) To enable option
(B) To disable option
(C) To create lists
(D) To enable or disable option
Ans: D
22. ____ Icon displays list of fonts that can be used.
(A) Text Size Icon
(B) Italics
(C) Change Font Icon
(D) Bold
Ans: C
23. Which tag is used to change the default characteristics of a
particular tag in the entire web document wherever that tag is
used?
(A) Meta tag
(B) Style tag
(C) Marquee tag
(D) Heading tag
Ans: B
24. The ___ attribute is used to specify the width of the table.
(A) CELLPADDING
(B) WIDTH
(C) CELLSPACING
(D) BORDER
Ans: B
26. Which one of the following indicates how light or dark a color
appears on the web page?
(A) Value
(B) shade
(C) Hue
(D) Tint
Ans: A
27. The communication protocol used by the Internet to transfer
hypertext documents is ___
(A) Hyper Text Internet Protocol
(B) Hyper Text Transfer Protocol
(C) Internet protocol
(D) File Transfer Protocol
Ans: B
28. The instructions indicated to the browser to display a
document are called ___
(A) Codes
(B) Tags
(C) Programs
(D) Statements
Ans: B
29. The primary colors are ____
(A) Red, green, yellow
(B) Red, white, yellow
(C) Red, green, blue
(D) Red, yellow, blue (Ans: C)
30. How many different colours can GIF contain?
(A) 64
(B) 156
(C) 256
(D) 264
Ans: C
31. Transferring your HTML code from one machine to server is
known as ___
(A) Indexing
(B) Hosting
(C) Serving
(D) Sorting
Ans: B
32. The _____ attribute is used to specify the value to be stored in
the variable if an option is selected.
(A) SIZE
(B) VALUE
(C) CHECKED
(D) TYPE
Ans: B
33. Which of the following programs are likely to become very
popular?
(A) HTML, XML
(B) OBJECT, Applet
(C) DHTML, XML
(D) HTML, DHTML
Ans: C
34. _____ contains the document itself.
(A) Structure
(B) Tag
(C) Head section
(D) Body section
Ans: D
35. Which of the following enables the computers around the world
to be connected together?
(A) Assembler
(B) Compiler
(C) HTML document
(D) Internet
Ans: C
36. The popular browser used to surf the Internet is
(A) Netscape Composer
(B) Notepad
(C) Microsoft Internet Explorer
(D) Microsoft word
Ans: C
37. Which is the formal description of message formats and rules
to be followed by computers?
(A) Standards
(B) Protocol
(C) Syntax
(D) Language
Ans: B
38. The CELLSPACING attribute is used to ___
(A) Specify the colour of the border
(B) Specify the thickness of the border
(C) Specify the space between cells
(D) Specify the space between text and border
Ans: C
39. Interactive documents that can be created using a feature of
HTML are called ____
(A) Tables
(B) Forms
(C) Files
(D) Frames
Ans: B
40. _____ are used to allow the user to select one of the options
displayed.
(A) Radio buttons
(B) Text boxes
(C) Check boxes
(D) Password controls
Ans: A
41. _____ is used to separate the attributes in the selected
segment of a style tag.
(A) :
(B) ;
(C) ,
(D) *
Ans: B
42. The image tag is always used with _____ attribute.
(A) Size
(B) SRC
(C) Color
(D) Font
Ans: B
43. The _____ attribute specifies the bullet style.
(A) FONT
(B) COLOR
(C) TYPE
(D) SIZE
Ans: C
44. RGB value for Red is
(A) FFOOFF
(B) FFFFFF
(C) FFOOOO
(D) FFFFOO
Ans: C
45. RGB value for Green is
(A) FFOOFF
(B) 00FF00
(C) FFOOOO
(D) FFFFOO
Ans: B
46. A collection of images that are part of MS office is called a ___
(A) Web
(B) FrontPage Express
(C) Clipart
(D) Toolbar
Ans: C
47. Software applications used for creating web pages and web
sites are called as ___
(A) Web programs
(B) Web page editors
(C) Web master
(D) Web links
Ans: B
48. Which attribute is used to specify the colour to be used for
links?
(A) BGCOLOR
(B) Link
(C) VLINK
(D) TEXT
Ans: B
49. <HTML> is followed by how many sections?
(A) 2
(B) 3
(C) 4
(D) 6
Ans: A
50. _____ attribute can be added to make one of the options as
the default option.
(A) SIZE
(B) CHECKED
(C) TYPE
(D) VALUE
Ans: B
51. Which of the following properties will we use to display border around a
cell without any content ? (A ) empty-cell
(B ) blank-cell
(C ) noncontent-cell
(D ) void-cell
Ans: A
52. XML is designed to store data and .------
(A ) Design
(B ) Verify
(C) Transport
(C) Both A&B Ans: C
53. Which of the following XML fragments are well-formed?
(A ) <myElement myAttribute = “some Value/”>
(B ) <myElement myAttribute = some Value/>
(C) <myElement myAttribute = ‘some Value/’>
(C) <myElement myAttribute = “some Value/’>
Ans: A
54. Which language is Extensible Markup Language (XML) similar?
(A ) HTML
(B ) PHP
(C ) JavaScript
(D ) Wordpress
Ans: A
55. The use of a DTD in XML development is:
(A ) required when validating XML documents
(B ) no longer necessary after the XML editor has been customized
(C ) used to direct conversion using an XSLT processor
(D ) a good guide to populating a templates to be filled in when generating
an XML document automatically
Ans: A
56. The default model for complex type, in XML schemas for element is
(A ) textOnly
(B ) elementOnly
( C ) no default type
(D ) both 1 & 2
Ans: B
57. The property specifies if/how an element is displayed.
(A ) background-color
( B ) border
(C ) color
(D ) display
Ans: D
58. The property specifies the background color of an element.
( A ) background-color
(B ) border
(C ) color
(D ) display
Ans: A
59. How to include HTML content into another HTML
(A ) Server Side push
(B ) Use of CommetD
(C ) Use of Polling
(D ) Use of include
Ans: D
60. If we want define style for an unique element, then which css selector
will we use ? (A ) Id
(B ) text
(C ) class
(D) name
Ans: A
61. In XML document comments are given as?
(A ) < !---- !>
(B ) < !-- ?
(C ) < /---->
(D ) < ?-- ?
62. DTD includes the specifications about the markup that can be used
within the document, the specifications consists of all EXCEPT
(A ) the browser name
(B ) the size of element name
( C) entity declarations
( D ) element declarations
Ans: A
63. Which are the main features of XML?
(A ) Text data description
(B ) Human- and computer-friendly format
( C ) Handles data in a tree structure having one-and only one-root element
(D ) All mentioned above
Ans: D
64. Which Characters are illegal in XML elements?
(A ) " < "
(B ) "&"
(C ) Both A & B
(D ) None of the above
Ans: C
65. Which is not a XML function?
( A ) Transport information
(B ) Style information
(C ) Store information
(D ) Structure information
Ans: B
66. Find 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" / >
(D ) None of the above
Ans: A
67. Which CSS property is used to control the text size of an element ?
(A ) font-style
( B ) text-size
(C ) font-size
( D ) text-style Ans: C
68. . In XML document comments are given as?
( A ) < !---- !>
( B ) < !-- ?
(C ) < /---->
(D ) < ?-- ?
Ans: B
69. Disadvantages of DTD are
(i)DTDs are not extensible
(ii) DTDs are not in to support for namespaces
(iii) there is no provision for inheritance from one DTDs to another
(A ) (i) is correct
(B ) (i),(ii) are correct
(C ) (ii),(iii) are correct
( D ) (i),(ii),(iii) are correct
Ans: D
70. Which method is used to set or reset CSS property in Jquery
(A ) selector.CSS() B : $(selector).css()
(C ) $(selector).style() D : None of above
Ans: B
UNIT 2
71. JavaScript statements embedded in an HTML page can respond to
user events such as mouse-clicks, form input, and page navigation.
(A) Client-side
(B) Server-side
(C) Local
(D) Native Ans: A
72. Which method is used to create new HTML element in JS
(A) document.createElement()
(B) document.createNewElement()
(C) newElement()
(D) document.HTMLElement()
Ans: A
73. How to assign the image source in JavaScript?
(A) image = “url”
(B) source(“url”)
(C) image.src = “url”
(D) img.src=”url”
Ans: C
74. Correct way of accessing javascript object var person =
{firstName:"John", lastName:"Doe"}
(A) person.lastName;
(B) person#lastName
(C) lastName
(D) None of above
Ans: A
75. . If para1 is the DOM object for a paragraph, what is the correct syntax
to change the text within the paragraph?
(A) "New Text"?
(B) para1.value="New Text";
(C) para1.firstChild.nodeValue= "New Text";
(D )para1.nodeValue="New Text";
Ans: B
76. How does JavaScript store dates in a date object?
(A) the number of milliseconds since January 1st, 1970
(B) The number of days since January 1st, 1900
(C) The number of seconds since Netscape's public stock offering.
(D) None of the above
Ans: A
77. Which is currect one to hide id element using jquery
( A) $(".test").hide()
(B) $("#test").hide()
(C) Both of above
(D) None of above
Ans: B
78. Which of the following best describes JavaScript?
(A) a low-level programming language.
(B) a scripting language precompiled in the browser.
(C) a compiled scripting language.
(D) an object-oriented scripting language.
Ans: D
79. What does validate() method of ActionForm returns?
(A) ActionErrors
(B) ActionForward
(C) ActionMapping
(D) ActionError
Ans: B
80. Statement in JavaScript ends with
(A) comma
(B) Semicolon
(C) Question mark
(D) Dollar sign
Ans: B
81. How many types of selectors available in jquery.
(A) 1
(B) 2
(C) 3
(D) 4
Ans: C
82. JavaScript is also called server-side JavaScript
(A) Microsoft
(B) Navigator
(C) LiveWire
(D) Native
Ans: C
83. Which of the following is correct?
(A) jQuery is a JavaScript Library
(B) jQuery is a JSON Library
(C) Both of These
(D) None
Ans: A
84. Which of the following is a server side technology?
(A) Html
(B) JSP
(C) JavaScript
(D) CSS
Ans: B
85. Which of the following is a client side technology?
(A) Html
(B) CSS
(C) JavaScript
(D) All of above
Ans: D
86. What is divide by 0 in Javascript?
var a = 10;
var b = 0;
document.write(a/b);
(A) Nothing is printed
(B) 0 is printed
(C) Infinity is printed
(D) Some Garbage Value
Ans: C
87. Which method is used to create new HTML element in JS
(A) document.createElement()
(B) document.createNewElement()
(C) newElement()
(D) document.HTMLElement()
Ans: A
88. Which is a currect Jquery Syntax to hide all paragraph elements
(A) ("p").hide()
(B) $("p").hide()
(C) $hide("p")
(D) p.hide()
Ans: B
89. Correct way of accessing javascript object var person =
{firstName:"John", lastName:"Doe"}
(A) person.lastName;
(B) person#lastName
(C) lastName
(D) None of above
Ans: A
90. A similar rule called the ----------is specified using the plus sign (+) and
is used to select elements that would be siblings of each other.
(A) class selectors
(B) attribute selectors
(C) adjacent-sibling selector
(D) none of the mentioned
Ans:C
91. Correct way to declare object in JS
(A) var x = {firstName:"John", lastName:"Doe"};
(B) x = obj(firstName:"John", lastName:"Doe")
(C) Both of above
(D) None of above
Ans: A
92. Which of the following type of variables have only two possible values
either true or false?
(A) Integers
(B) Doubles
(C) booleans
(D) Strings
Ans: C
93. What is the correct syntax for referring to an external script called "
abc.js"?
(A )<script href = “abc.js”>
(B)<script name= “abc.js”>
(C)<script src = “abc.js”>
(D )NONE
94. What will function return
function sum ()
{
var s = 0;
for (var i = 0; i < arguments.length; i++)
s += arguments[i];
return s; }
sum(1, 2, 3,4,5);
(A) 2
(B) 5
(C) 15
(D) NONE
Ans: C
94. Which of the following is the Web application equivalent to
querySelectorAll()?
(A) #()
(B) &()
(C) $()
(D) None of the mentioned
Ans: C
95. What should appear at the very end of your JavaScript? The
<script LANGUAGE="JavaScript">tag.
(A) The </script>
(B) The <script>
(C) The END statement
(D) None of the above
Ans: A
96. Find output of below code:
var a = '10';
var b = a = 20;
document.write(a+b);
(A) Error in Script
(B) 10'20
(C) 1020
(D) 40
Ans: D
97. Find output of below Javascript code
<script>
document.write(2+2 + " = 2 plus 2");
</script>
(A) 2+2+ = 2 plus 2
(B) 4 + = 2 plus 2
(C) 4 = 2 plus 2
(D) Syntax Error
Ans: C
98. Which of the following type of variable is visible everywhere in
your JavaScript code?
(A) global variable
(B) local variable
(C) Both of the above
(D) None of the above
Ans: A
99. Which of the following best describes JavaScript?
(A) a low-level programming language.
(B) a scripting language precompiled in the browser.
(C) a compiled scripting language.
(D) an object-oriented scripting language.
Ans: D
100. Why so JavaScript and Java have similar name?
(A) JavaScript is a stripped-down version of Java
(B) JavaScript's syntax is loosely based on Java's
(C) They both originated on the island of Java
(D) None of the above
Ans: B
101. Which Method is used to find element using class name
(A) findElementByClassName()
(B) getElementByClassName()
(C) className()
(D) getClass()
Ans: B
102. How is everything treated in HTML DOM?
(A) Node
(B) Attributes
(C) Elements
(D) Arrays
Ans: A
103. Correct method to sort elements from array a in javascript is
(A) a.sort()
(B) sort(a)
(C) a = sort()
(D) None of above
Ans: A
104. What is the correct JavaScript syntax to write "Hello World"?
(A) System.out.println("Hello World")
(B) println ("Hello World")
(C) document.write("Hello World")
(D) response.write("Hello World")
Ans: C
105. What is the correct way to open the file "time.txt" as readable?
(A) fopen("time.txt","r");
(B) open("time.txt","read");
(C) fopen("time.txt","r+");
(D) open("time.txt");
Ans: A
106. Which is currect one to hide class element using jquery
(A) $(".test").hide()
(B) $("#test").hide()
(C) Both of above
(D) None of above Ans: A
107. What are the advantages of DOM Parsing?
(A) The DOM is a common interface for manipulating document structures
(B) One of its design goals is that Java code written for one DOM-compliant
parser should run on any other DOM-compliant parser without changes
(C) Both of the above
(D) None of the above
Ans: C
108. jQuery code to set the background color of all span elements to
blue?
(A) $("span").style("background-color","blue");
(B) $("span").manipulate("background-color","blue");
(C) $("span").css("background-color","blue");
(D) $("span").layout("background-color","blue");
Ans: C
109. What is the correct way to add 1 to the $count variable?
(A) $count++;
(B) ++count
(C) $count =+1
(D) count++;
Ans: A
110. What is the difference between echo and print?
(A) They both behave the same.
(B) Print can take multiple parameters where as echo can not
(C) Echo can take multiple parameters where as print can not
(D) Print is a function where as echo is not.
Ans: C
111. To add the attribute named Type to the <customer> tag the
syntax will be
(A) <customer attribute Type=”exelent”>
(B) <customer Type attribute =”exelent”>
(C) <customer Type attribute_type=”exelent”>
(D) <customer Type=” exelent” >
Ans: D
112. Which types of image maps can be used with JavaScript?
(A) Server-side image maps
(B) Client-side image maps
(C) Server-side image maps and Client-side image maps
(D) None of the above
Ans: B
113. Which of the following event fires when the form element loses
the focus: <button>,
<input>, <label>, <select>, <textarea>?
(A) onfocus
(B) onblur
(C) onclick
(D) ondblclick
Ans: D
114. What is the output of following Javascript?
var a = 'cpp';
var b = 'buzz';
var c = a/b;
document.write(c);
(A) cppbuzz
(B) cpp/buzz
(C) NaN
(D) None of the above
Ans: C
115. Correct way to declare object in JS
(A) var x = {firstName:"John", lastName:"Doe"};
(B) x = obj(firstName:"John", lastName:"Doe")
(C) Both of above
(D) None of above
Ans: A

116. Which is a currect Jquery Syntax to hide all paragraph elements


(A) ("p").hide()
(B) $("p").hide()
(C) $hide("p")
(D) p.hide()
Ans: B
117. Which object is the top of the hierarchy?
(A) Window Object
(B) Document Object
(C) Form Object
(D) Form Control Elements
Ans: A

118. Which of the following is a web server?


(A) Eclipse
(B) Apache tomcat
(C) Netbeans
(D) All of the above
Ans: B
119. JavaScript is interpreted by
(A) Client
(B) Server
(C) Object
(D) none of these
Ans: A
120. How to assign the image source in JavaScript?
A : image = “url”
B : source(“url”)
(C) image.src = “url”
(D) img.src=”url”
Ans: C
121. Which method is used to set or reset CSS property in Jquery
(A) selector.CSS()
(B) $(selector).css()
(C) $(selector).style()
(D) None of above
Ans: B
122. Choose the client-side JavaScript object?
(A) Database
(B ) Cursor
(C) Client
(D) FileUpLoad
Ans: D
123. Which of the following function sorts an array in reverse order?
(A) rsort()
(B) sort()
(C) shuffle()
(D) reset()
Ans: A
124. When a user views a page containing a JavaScript program,
which machine actually executes the script?
(A) The User's machine running a Web browser
(B) The Print Server
(C) A central machine deep within Netscape's corporate offices
(D) The Web server
Ans: A

125. Which jQuery method is used to switch between


adding/removing one or more classes (for CSS) from selected
elements?
(A) switchClass()
(B) toggleClass()
(C) altClass()
(D) switch()
Ans: B

126. Which one is standard way to show popup in Java Script?


(A) window.alert("cppbuzz");
(B) alert("cppbuzz");
(C) window("cppbuzz");
(D) alert("cppbuzz")
Ans: A

127. Not a number is checked in JS by


(A) NaN()
(B) isNaN()
(C) Both of above
(d) None of these
Ans: B

128. Statement in Javascript ends with


(A) comma
(B) semicolon
(C) Question mark
(D) Dollar sign
Ans: B

129. How is everything treated in HTML DOM?


(A) Node
(B) Attributes
(C) Elements
(D) Arrays
Ans: A

130. New element is added to JS array by using method


(A) append
(B) push
(C) All of the above
(D) None of above
Ans: B

131. Which one of the following methods is responsible for sending


the query to the database?
(A) query()
(B) send_query()
(C) sendquery()
(D) query_send()
Ans: A

132. Parameter entities can appear in


(A) xml file
(B) dtd file
(C) xsl file
(D) Both 1 and 2
Ans: B

133. The events that represents occurrences related to the browser


window are
(A) Window
(B) Element
(C) Display
(D) Handlers
Ans: A
134. Correct way of accessing javascript object var person =
{firstName:"John", lastName:"Doe"}
(A) person.lastName;
(B) person#lastName
(C) lastName
(D) None of above Ans: A
135. The attribute is used to define the name(s) of the class(es) to
which a particular tag belongs.
(A) class
(B) element
(C) id
(D) none of the mentioned
Ans: A

136. Which is currect one to hide class element using jquery


(A) $(".test").hide()
(B) $("#test").hide()
(C) Both of above
(D) None of above
Ans: A

137.JavaScript statements embedded in an HTML page can respond


to user events such as mouse-clicks, form input, and page navigation.
(A) Client-side
(B) Server-side
(C) Local
(D) Native
Ans: A

138. Which of the following methods is overridden by Action class?


(A) run()
(B) destroy()
(C) execute()
(D) service()
Ans: C
139. When a user views a page containing a JavaScript program,
which machine actually executes the script?
(A) The User's machine running a Web browser
(B) The Web server
(C) A central machine deep within Netscape's corporate offices
(D) None of these
Ans: A

140. Which of the following best describes JavaScript?


(A) a low-level programming language.
(B) a scripting language precompiled in the browser.
(C) a compiled scripting language.
(D) an object-oriented scripting language.
Ans: D
141. Correct method to sort elements from array a in javascript is
(A) a.sort()
(B) sort(a)
(C) a = sort()
(D) None of above
Ans: A

142. New element is added to JS array by using method


(A) append
(B) push
(C) both
(D) None of these
Ans: B
143. jQuery method to set one or more style properties for selected elements?
(A) style()
(B) css()
(C) html()
(D) None
Ans: B

144. Which one of the following method is used to retrieve the number
of rows affected by an INSERT, UPDATE, or DELETE query?
(A) num_rows()
(B) affected_rows()
(C) changed_rows()
(D) new_rows()
Ans: B

145. Choose the server-side JavaScript object?


(A) FileUpLoad
(B) Function
(C) File
(D) Date
Ans: C
146. Which of the following is correct?
(A) jQuery is a JavaScript Library
(B) jQuery is a JSON Library
(C) Both of These
(D) None
Ans: A

147. Which method is used to set or reset CSS property in Jquery


(A) selector.CSS()
(B) $(selector).css()
(C) $(selector).style()
(D) None of above
Ans: B

148. JavaScript is interpreted by


(A) Client
(B) Server
(C) Object
(D) None of the above
Ans: A

149. We can add new element at the end of existing element using
A : append
B : new
C : addLast
D : None of above
Ans: A

150. What scripting language is jQuery written in?


(A) VBScript
(B) C++
(C) JavaScript
(D) C#
Ans: C
UNIT-3
151. Which attribute specifies a JSP page that should process any
exceptions thrown but not caught in the current page?
a. The ErrorPage Attribute
b. The IsErrorPage Attribute
c. Both A & B
d. None of the above
Ans: a
152. How many jsp implicit objects are there and these objects are
created by the web container that are available to all the jsp pages?
a. 8
b. 9
c. 10
d. 7
Ans: b
153. JavaServer Pages often serve the same purpose as programs
implemented using the Common Gateway Interface (CGI).
a. True
b. False
Ans: True
154. A JSP page consists of which tags?
a. HTML tags
b. JSP tags
c. Both A & B
d. None of the above
Ans: c
155. In JSP how many ways are there to perform exception
handling?
a. 3
b. 2
c. 4
d. 5
Ans: b
156. Which JSP Action tags is used to include the content of
another resource, it may be jsp, html or servlet?
a. jsp:include
b. jsp:forward
c. jsp:plugin
d. jsp:papam
Ans: a
157. Which tag is used to execute java source code in JSP?
a. Declaration Tag
b. Scriptlet tag
c. Expression tag
d. None of the above
Ans: b
158. Which technology do we mix our business logic with the
presentation logic?
a. Servlet
b. JSP
c. Both A & B
d. None of the above
Ans: a
159. Which action tags are used in JSP for developing web
application with Java Bean?
a. jsp:useBean
b. jsp:setProperty
c. jsp:getProperty
d. Both B & C
Ans: d
160. Which packages does a JSP API consist of:
a. javax.servlet.jsp
b. java.servlet
c. javax.servlet.jsp.tagext
d. Both A & C
Ans: d
161. What technique is used for the authentication mechanism in
the servlet specification?
a. Role Based Authentication
b. Form Based Authentication
c. Both A & B
d. None of the above
Ans: a
162. Which attribute specifies a JSP page that should process any
exceptions thrown but not caught in the current page?
a. The ErrorPage Attribute
b. The IsErrorPage Attribute
c. Both A & B
d. None of the above
Ans: a
163. Which two interfaces does the javax.servlet.jsp package have?
a. JspPage
b. HttpJspPage
c. JspWriter
d. Both a & b
Ans: d
164. Which is the Microsoft solution for providing dynamic Web
content?
a. ASP
b. JSP
c. Both A & B
d. None of the above
Ans: a
165. JSP often serve the same purpose as programs implemented
using the Common Gateway Interface (CGI)
a. True
b. False
Ans: a
166. Which of the following is true about Initialization phase in JSP
life cycle?
A. Container invokes _jspService() method during Initialization phase
B. When a container loads a JSP it invokes the jspInit() method before
servicing any requests.
C. jspInit() method is called every time during each service request to JSP.
D. spInit() method is not part of Initialization phase of JSP.
Ans: B
167. The default port number of Tomcat Server is:
A : 8080
B : 7001
C : 8010
D : 9001
Ans: A
168. Which event handler is triggered when the user’s mouse moves
onto a link?
A : onMouseOver
B : onMouseOut
C : onMouse
D : onMouseOnto
Ans: A

169. What are cookies?


A : Cookies are text files stored on the client computer and they are kept for
various information tracking purpose.
B : Cookies are binary files stored on the server computer and they are
kept for various information tracking purpose.
C : Cookies are binary files stored on the client computer and they are kept
for data storage purpose.
D : Cookies are implicit object in JSP
Ans: A
170. Which of the following method can be used to read a multiple
values with same name, for example check box selections in JSP?
A : request.getParameter()
B : response.getParameter()
C : request.getParameterValues()
D : response.getParameterValues()
Ans: B
171. Which of the following is true about init() method of servlet?
A : The init() method loads new data for each service request of the servlet.
B : The init() method is called again and again for each user request
C : The init() method is called only once.
D : The init() method is never called in servlet.
Ans: C
172. Which of the following code is used to get session in servlet
A : response.getSession()
B : serveltSession.getSession()
C : new Session()
D : request.getSession()
Ans: D
173. A bean encapsulates many objects into one object, so we can
access this object from multiple places.
a. True
b. False
Ans: A
174. In JSP page directive which attribute defines the MIME type of
the HTTP response?
a. import
b. Content Type
c. Extends
d. Info
Ans: B
175. The ASP and JSP technologies are quite similar in the way they
support the creation of Dynamic pages, using HTML templates,
scripting code and components for business logic.
a. True b. False
Ans: A
176. jsp:useBean action tag in JSP is used to
A : to locate or instantiate a bean class
B : Include a file at the time the page is requested.
C : Set the property of a JavaBean.
D : Forward the requester to a new page.
Ans: B
177. Declaration tag sytax in JSP is :
A : <%! declaration%>
B : <%= declaration%>
C : <%-- declaration%>
D : <%@ declaration%
Ans: A
178. Which of the following tags in struts-config.xml file defines the
availability of necessary Struts JSP custom tag libraries?
A : jsp-lib
B : struts-taglib
C : taglib
D : jsp-taglib
Ans: C
179. Which of the following is the correct order of servlet life cycle
phase methods?
A : init(), service(), delete()
B : init(), service(), destroy()
C : init(), execute(), destroy()
D : initialize(), service(), destroy()
Ans: B
180. Every JSP is Translated into a:
A : Java applet
B : Java servlet
C : Java EJB
D : Java Struts
Ans: B
181. What JSP stands for?
A : Java Service Programming
B : Java Server Programming
C : Java Service Pages
D : Java Server Pages Ans: D
182. Which of the following is a web server?
A : Eclipse
B : Apache tomcat
C : Netbeans
D : All of the above
Ans: B
183. Which of the following is a server side technology?
A : Html
B : JSP
C : JavaScript
D : CSS
Ans: B
184. Which of the Following are the valid scopes in JSP.
A : response, page, session, application
B : request, page, session, global
C: request, page, context, application
D : request, page, session, application
Ans: D
185. Which of the following represents the root of the Tomcat installation?
A : $CATALINA
B : $CATALINA_HOME
C : $HOME
D : None of these
Ans: B
186. What does JSTL stands for
A : JSP Tag Library
B : JSP Standard Tag Library
C : Java Standard Tag Library
D : Java Standard Template Library
Ans: B
187. Which of the following is not a implicit object in JSP?
A : request
B : response
C : cookie
D : session Ans: C
188. which of the following is not a JSP Action Tag
A : jsp:forward
B : jsp:include
C : jsp:useBean
D : Jsp:import
Ans: D
189. Comment Tag syntax in JSP is:
A : <%! comment%>
B : <%@ comment%>
C : <%= comment%>
D : <%-- comment--%>
Ans: D
190. In servet, the line of code that retrieves session ID specified by
the client is
A : request.getRequestedSessionId()
B : response.getRequestedSessionId()
C : Header.getRequestedSessionId()
D : request.getId()
Ans: A
191. Which one of the following methods can be used to diagnose and
display information about a MySQL connection error?
A : connect_errno()
B : connect_error()
C : mysqli_connect_errno()
D : mysqli_connect_error()
Ans: C
192. Which method rolls back the present transaction?
A : commit()
B : undo()
C : back()
D : rollback()
Ans: D
193. If there is no error, then what will the error() method return?
A : true
B : false
C : Empty String
D:0 Ans: C
194. Which method returns the error code generated from the
execution of the last MySQL function?
A : errno()
B : errnumber()
C : errorno()
D: NONE
Ans: A
195. Which of the following methods is used to execute the statement
after the parameters have been bound?
A : bind_param()
B : bind_result()
C : bound_param()
D : bound_result()
Ans: A
196. Which of the following is the structure of an if statement?
A : if (conditional expression is true) thenexecute this codeend if
B : if (conditional expression is true)execute this codeend if
C : if (conditional expression is true) {then execute this code>->}
D : if (conditional expression is true) then {execute this code}
Ans: C
197. Which of the following array represents an array with strings as
index?
A : Numeric Array
B : Associative Array
C : Multidimentional Array
D : Normal Array
Ans: B
198. Tomcat’s JSP Engine in know as
A : Catalina
B : Tomcat sink
C : Casper
D : Jasper
Ans: D
199. Which of the following is true about Initialization phase in JSP life
cycle?
A : Container invokes _jspService() method during Initialization phase
B : When a container loads a JSP it invokes the jspInit() method before servicing
any requests.
C : jspInit() method is called every time during each service request to JSP.
D : spInit() method is not part of Initialization phase of JSP.
Ans: B
200. A way to create a cookie in servlet is :
A : Use response.getCookie() method
B : Use new operator
C : Use request.getCookie() method
D : Use request.createCookie() method
Ans: B
201. What is javax.servlet.Servlet?
A : Abstract class
B : Interface
C : Concreate class
D : Public class
Ans: B
202. Which of the following code retrieves the value of a request
parameter in servlet?
A : Header.getParameter(name)
B : response.getParameter(name)
C : request.getAttributeNames()
D : request.getParameter(name)
Ans: D
203. Which of the following method can be used to read a form
parameter in JSP?
A : response.getParameter()
B : request.getParameter()
C : request.getValue()
D : response.getValue()
Ans: B
204. Which JSP Action tags is used to include the content of another
resource, like jsp, html or servlet?
A : jsp:plugin
B : jsp:include
C : jsp:forward
D : jsp:useBean Ans: B
205. Which of the following code is used to get names of the
attributes in servlet ?
A : response.getAttributeNames()
B : request.getAttributeNames()
C : Header.getAttributeNames()
D : None of the above
Ans: B
206. The code for seding a cookie in servlet is
A : response.createCookie(cookie)
B : response.sendCookie(cookie)
C : response.addCookie(cookie)
D : None of the above
Ans: C
207. request is instance of which class in JSP?
A : Request
B : HttpServletRequest
C : HttpRequest
D : ServletRequest
Ans: B
208. Which of the following method can be used to read parameters
names in JSP?
A : request.getParameter()
B : response.getParameter()
C : request.getParameterNames()
D : response.getParameterNames()
Ans: C

209. Which of the following code is used to get cookies in servlet?


A : response.getCookies()
B : request.getCookies()
C : Cookies.getCookies()
D : servlet.Cookies()
Ans: B
210. What is the correct way to open the file "time.txt" as readable?
A : fopen("time.txt","r");
B : open("time.txt","read");
C : fopen("time.txt","r+");
D : open("time.txt"); Ans: A
211. Which of the following attributes are mandatory in <jsp:getProperty /> tag
A : name, property
B : type, id
C : name, type
D : id, property
Ans: A
212. Scriptlet tag sytax in JSP is :
A : <%@ java source code %>
B : <%! java source code %>
C : <%= java source code %>
D : <% java source code %>
Ans: D
213. Every JSP is Translated into a:
A : Java applet
B : Java servlet
C : Java EJB
D : Java Struts
Ans: B
214. A new web browser window can be opened using which method
of the Window object ?
A : createtab()
B : Window.open()
C : open()
D : All of the mentioned
Ans: B
215. Which of the following statement is true about the destroy()
method of servlet?
A : The destroy() method is called multiple times during the life cycle of a servlet
B : The destroy() method is called only once at the end of the life cycle of a servlet.
C : The destroy() method is called after the servlet has executed service method.
D : The destroy() method is called is never called during the life cycle of a servlet.
Ans: B
216. Which of following statemants is true about filters in JSP?
A : JSP Filters are used to intercept requests from a client before they
access a resource at back end
B : JSP Filters are used to manipulate responses from server before they
are sent back to the client.
C : Filters are defined in the deployment descriptor file web.xml.
D : All of the above
Ans: D
217. Which of the following function sorts an array in reverse order?
A : rsort()
B : sort()
C : shuffle()
D : reset()
Ans: A
218. The setTimeout() belongs to which object?
A : Element
B : Window
C : Location
D : None of the mentioned
Ans: B
219. Which of the following is true about init() method of servlet?
A : The init() method loads new data for each service request of the
servlet.
B : The init() method is called again and again for each user request.
C : The init() method is called only once.
D : The init() method is never called in servelt.

220. What is javax.servlet.http.HttpServlet?


A : Abstract class
B : Interface
C : Concreate class
D : Package
Ans: A
221. Which of the following code delete a cookie in servlet?
A : deleteCookie(cookie);
B : request.deleteCookie(cookie);
C : cookie.setMaxAge(0)
D : esponse.deleteCookie(cookie);
Ans: C
222. Which of the following is an implicit object?
A : pageContext
B : servletContext
C : httpContext
D : sessionContext
Ans: A
223. Which of the following is not a implicit object in JSP?
A : request
B : response
C : cookie
D : session
Ans: C

224. Expression tag sytax in JSP is :


A : <%@ expression%>
B : <%! expression%>
C : <%= expression %>
D : <%-- expression%>
Ans: C

225. Which of the following is true about Servlets


A : Java Servlets are programs that run on a Web server or Application server.
B : Java Servlets are the program that run in the web browser space.
C : Java Servlets are client side programs that run on a client side
D : None of the above
Ans: A

You might also like