Font size
WorksheetsIWT_2024_Quiz
Total questions: 70
Worksheet time: 34mins
To display writing on the screen you must include ___ in Java Script.
Which type of Statement can execute parameterized queries in JDBC?
PreparedStatement
ParameterizedStatement
ParameterizedStatement and CallableStatement
All kinds of Statements (i.e. which implement a sub interface of Statement)
Which packages in java contain the JDBC classes?
java.jdbc and javax.jdbc
java.jdbc and java.jdbc.sql
java.sql and javax.sql
java.rdb and javax.rdb
Select the method to get HTML form data into JSP?
getParameter()
request.getparameter()
request.getParameter()
request.getString()
Java code is embedded under which tag in JSP?
Expression
Declaration
Scriptlet
Comment
<%=a+b %>
<%=a+b; %>
<%!a+b %>
<%!a+b; %>
Predict the output: Provided uname text field with the value "Harry"
<html>
<body>
<%= "Welcome "+request.getParameter("uname") %>
</body>
</html>
Welcome Harry
Harry
500 Internal Server Error : Null Pointer Exception
JSP Translation Error: request not declared
Which method is used to perform DML statements in JDBC?
execute()
executeQuery()
executeUpdate()
executeResult()
To declare a JavaScript variable, you should NOT use?
Let
Var
Const
Int
Inside which HTML element do we put the JavaScript
<scripting>
<script>
<js>
<javascript>
Is JavaScript case sensitive language?
Yes
No
Depends on the browser
Depends on the platform
Identify non-primitive datatype from the following?
String
Array
number
boolean
What is the output of the following script?
function display() { document.writeln(10+20+"30"); } display();
60
30"30"
3030
102030
What is proper syntax for declaring a array in JavaScript?
var arrayName =[ ];
var arrayName[ ] ={ };
array arrayName ={ };
obj var arrayName =[ ];
String txt = "Hello World";
alert(txt.toUpperCase());
Choose the correct output.
"HELLO WORLD"
HELLO WORLD
Hello world
Hello World
What will be the output of below code?
String statement = "Outfit of the day";
alert(statement.slice(3,6));
it of
tfit
fit
FIT
What will be the output of below code?
String statement = "Outfit of the day";
alert(statement.slice(-7,-4));
it of
the d
the
FIT
What will be the output of below code?
String statement = "Outfit of the day";
alert(statement.search(/o/i));
7
0
6
8
What will be the output of below code?
String statement = "Outfit of the day";
alert(statement.indexOf("o",7));
7
0
6
8
What will be the output of below code?
String statement = "Outfit of the day";
alert(statement.slice(7));
it of
tfit
of the day
FIT of the day
A list block can be defined inside another list is called as ___________________
Ordered list
Nested list
Definition list
Unordered list is surrounded within _____________ tags.
<ol>.........</ol>
<ul>........</ul>
<dl>........</dl>
In ordered list, the default number style is ______________
A,B,C,D........
I,II,III,IV........
1,2,3,4.............
What is DTD?
a. Document type Determination
b. Determination Type Defination
c. Document Text Definition
d. Document Type Definition
comments in java script can be specified using
<!-- comment -->
<%-- comment --%>
/*-- comment --*/
#comment#
function myFunction(a,b) {
var b=a;
return b * b;
}
if the above function called as:
var x = myFunction(4,5); what is the value of x?
25
9
1
16
DOM stands for
Dynamic object model
Document object model
Dynamic object method
Document object method
Style rules may be applied via ___ types of stylesheets.
1
2
3
None of the above
Which property is used to change the background color?
Bgcolor
Bg-color
Color
Background-color
Which of the following property is used to control the repetition of an image in the background?
background-repeat
background-color
background-image
background-position
Which of the following declarations will turn the text in a paragraph to bold?
font-weight: bold;
font=bold;
font-size: large;
font-weight: normal;
Which of the following is NOT a way to apply CSS properties to your website?
The inline method
The embedded method
The outline method
The external method
Which of the following lines of code will correctly set the color of text inside a <h2> element to blue, when found in an external CSS file?
h2 {color: blue;}
h2 {text-color:blue;}
style="h2:color,blue;"
h2 text-color:blue
Given a RGB value of #00FF00, what will be the resulting color on the screen?
Red
Blue
Green
A mixture of red, green and blue
How do you create an inline style?
Define a style rule in your < head > area
Add a list of property attributes to the target element
Add a “style” attribute to the target element
Add a “css” attribute to the target element
Which of the following codes sets the font size to 32pt using internal style sheet?
<h1 style="font-size:32pt;"></h1>
<h1 font-size="32pt"></h1>
h1{font-size:32pt;}
h1{size:32pt;}
Which of the following codes sets the font to Arial using inline style sheet?
<p font="Arial"></p>
<p style="Arial"></p>
<p style="font-family:Arial"></p>
p{font-family:Arial;}
When you use id selector
What should present infront of idname
?
@
#
.
table, td {border:0}
Shows no border around the table
Shows no border with the table
Shows no border around and within the table
Structure of CSS code
A { B : C }
What is placed at A?
tag
value
attribute
The external CSS is linked to the HTML document in the _________
<head> </head>
<body> </body>
Which CSS property is used to specify how long the transition effect to take place?
transition-timing-function
transition-property
transition-delay
transition-duration
What is the syntax for defining keyframes in CSS?
@keyframes
keyframes{}
keyframes()
#keyframes
What is the purpose of keyframe animations in CSS?
The purpose of keyframe animations in CSS is to create smooth and dynamic animations with more control and customization.
Keyframe animations in CSS are used to add text effects to web pages.
Keyframe animations in CSS are used to create static and unchanging animations.
Keyframe animations in CSS are used to make web pages load faster.
What will be the output of the following code snippet?
<script type="text/javascript">
var a = 5;
var output = 5 + "9";
document.write(output);
</script>error
14
59
non of these
Which of the following is the correct CSS link tag?
<link rel="styles" href="stylesheet.css">
<link href="stylesheet">
<link rel="stylesheet" src="styles.css">
<link rel="stylesheet" href="styles.css">
String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
What is the correct way to find the length of "txt" string?
var len = length(txt);
var len = txt.length();
var len = txt.length;
var len = length(txt);
What will be the output of below code?
String statement = "Outfit of the day and of the night";
alert(statement.replace(/o/g, "i"));
Outfit if the day and if the night
Outfit of the day and if the night
Outfit if the day and of the night
iutfit if the day and if the night
Which method removes the last element from an array and returns that element?
A) push()
B) pop()
C) shift()
D) unshift()
The Array.isArray() method returns true if the argument is an array, otherwise:
A) It returns false
B) It returns null
C) It returns undefined
D) It throws an error
In JavaScript, what is a callback function?
A function that is called automatically when a certain event occurs.
A function that is passed as an argument to another function and is executed after some operation has been completed.
A function that is called inside a loop.
A function that is executed before any other function in a program.
What method combines the text of two strings and returns a new string?
A) append()
B) merge()
C) concat()
D) combine()
The charAt() method returns the character at a specified index within a string. If the index is out of range, what does it return?
A) null
B) undefined
C) Empty string
D) Error
The trim() method removes whitespace from both ends of a string. Which of the following whitespace characters does it remove?
A) Space
B) Tab
C) Newline
D) All of the above
What does the typeof operator return when used on an array?
A) "array"
B) "object"
C) "undefined"
D) "number"
A function declaration consists of the following
The function keyword.
The name of the function, or its identifier, followed by parentheses.
A function body enclosed in the function’s curly brackets, { }.
a backtick inside console.log()
