NEW
Font size
WorksheetsTest 04 May
Total questions: 40
Worksheet time: 40mins
What is an exception
Error occurred during the execution of a program
Bug occurred during the compile time of a program
Simply an Error
It is related to input values
Choose an exception if attempt to divide number by zero
int number = 89 / 0;
System.out.println("The answer is " + number);
ArithmeticException
NullPointerException
NumberFormatException
ArrayIndexOutOfBoundException
-Contains no duplicate elements.
-Can contain at most one Null value.
-Elements are not key-value pairs.
-Accessing an element can be almost as fast as performing a similar operation on an array.
Which of these classes provides the specified features?
LinkedList
TreeMap
HashSet
LinkedHashMap
HashMap
{1=C, 2=JavaEE, 4=Python, 3=PHP}
{1=C, 2=JavaSE, 3=Python, 4=PHP}
{1=C, 2=JavaEE, 3=Python, 4=PHP}
{1=C, 2=JavaSE,2=JavaEE, 3=Python, 4=PHP}
NullPointerException
4
5
6
12
What will be the output of the Java program?
{0, 1, 3, 4}
{0, 1, 2, 4}
{0, 1, 2, 3, 4}
{0, 0, 0, 3, 4}
Which one of the following statement is not true about the collection interface?
all methods defined in set interface are also defined in collection interface
list interface extends collection interface
set interface extends collection interface
all methods defined in list interface are also defined in collection interface
Choose the correct JavaScript syntax to change the content of the following HTML code.
document.getElement (“WadJava").innerHTML = "I am a WadJava";
document.getElementById (“WadJava").innerHTML = "I am a WadJava";
document.getId (“WadJava") = "I am a WadJava";
document.getElementById (“WadJava").innerHTML = I am a WadJava;
To use the external DTD we have the syntax
<?xml version=”A.0” standalone=”no”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
<?xml version=”A.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
<?xml version=”A.0” standalone=”no”?>
<! DOCTYPE DOCUMENT “order.dtd”?>
<?xml version=”A.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
What is the output of the program when accessed to context root URL?
Hellostar
whitelabel error page
Hello***********
None of the above
REST stands for
REpresentational State Transport
Representational Expression State Transfer
REpresentational Style Transfer
REpresentational State Transfer
If the in-order and post-order traversals of a binary tree are given as 2, 3, 4, 5, 6, 7, 8, 9 and 3, 2, 5, 7, 6, 9, 8, 4 respectively, identify the root.
4
5
9
8
If we build a min-heap with the following list of elements
24, 54, 32,76,3, 56, 93, 17, 43, 60. What will be the key at the root?
24
93
3
60
Write the postfix notation of the following infix expression.
A+B*C+(D*E+F)*G
ABC*+DE*F+G*+
AB+C*DE*F+G*+
ABC*+DE*F++G*
AB+C*DE*F++G*
How would a binary heap for an array A = {2,7,26,25,19,17,1,90,3,36} look like?
Consider a circular array based queue ’Q’ that is capable of holding 12 elements. What would the element at index 3 be after execution of the following code snippet on the array? Assume Q is initially empty and its indices run from 0 to 11.
for(i=1; i != 10; i++)
q.enqueue(i);
for(i=1; i != 6; i++)
q.dequeue();
q.enqueue(q.dequeue());
6
5
4
3
The inorder and postorder traversal of a binary tree are ’d b e a f c g’ and ’d e b f g c a’, respectively.
(a) Is the binary tree a complete binary tree?
(b) Identify the root node.
(c) What is the preorder traversal of the binary tree?
(a) No
(b) a
(c) Preorder : a b c d e f g
(a) Yes
(b) a
(c) Preorder : a b d e c f g
(a) Yes
(b) d
(c) Preorder : a b d e c f g
(a) Yes
(b) d
(c) Preorder : a b d e c g f
Which of the following best fits for forward and back buttons in web browsers?
Stack
Queue
Binary Search Tree
None of these
Predict the output of the following C code.
int main(){
char c = 011;
printf("%d",c);
return 0;
}
11
10
9
None of the other.
Consider the following sequence of operations on an empty stack.
push(54); push(52); pop(); push(55); push(70); s=pop(). Consider the following sequence of operations on an empty queue. enqueue(21); enqueue(24);dequeue(); enqueue(28); enqueue(32); q=dequeue(). The value of s + q is
86
68
24
94
If every non-key attribute is functionally dependent on the primary key, then the relation will be in :
1NF
2NF
3NF
4NF
What is returned by SUBSTR(‘TUTORIALS POINT’, 1, 9)
TUTORIAL
POINT
TUTORIALS
UTORIALS
The statement in SQL which allows to change the definition of a table is
Alter
Update
Create
Select
The term "Data" refers to
The electronic representation of the information( or data)
Basic information
Row Facts and figures
Both A and C
SELECT * FROM employee WHERE dept_name="Comp Sci";
In the SQL given above there is an error . Identify the error.
Dept_name
Employee
“Comp Sci”
From
The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.
Where, from
From, select
Select, from
From, where
Which of the following statements contains an error?
Select * from emp where empid = 10003;
Select empid from emp where empid = 10006;
Select empid from emp;
Select empid where empid = 1009 and lastname = ‘GELLER’;
In ordered indices the file containing the records is sequentially ordered, a ___________ is an index whose search key also defines the sequential order of the file.
Clustered index
Structured index
Unstructured index
Nonclustered index
9. Which command is used to permanently save into database?
a) SAVE POINT
b) COMMIT
c) ROLLBACK
d) SET
Which HTTP method is advised to send sensitive information like password and OTP while sending it to the application server ?
GET
POST
DELETE
What will be the output of the “hello” +1+2+3?
a) hello123
b) hello
c) Error
d) hello6
If a=(1,2,3,4), a[1:-1] is _________
a) Error, tuple slicing doesn’t exist
b) [2,3]
c) (2,3,4)
d) (2,3)
What will be the output of the following Python code?
x = [[0], [1]]
print((' '.join(list(map(str, x))),))
01
What will be the output of the following Python code snippet?
z=set('abc$de')
'a' in z
True
False
Which lines are having an error in the shown code
Line 1 and 2
Line 2 and 3
Line 3 and 4
line 5 and 6
What is the output?
more than 7
more than 23
spam
7
The display of web pages in HTML5 starts with the standards created by the W3C. The standards list and describe _______________.
All the available elements
the parameters for how user agents should use available elements
Both A and B
Neither A nor B
How can you open a link in a new browser window?
<a href="url" target="_blank">
<a href="url" target="new">
<a href="url" new>
<a href="url" target="">
