Professional Documents
Culture Documents
1. Out of 10 teachers of a school, one teacher retires and in place of him a new teacher (1 point)
25 yrs. old joins. As a result of it average age of the teachers reduces by 3 yrs. Age
of the retired teacher (in yrs.) is.
Example : 26
55
Emp10
firstname lastname gender salary
pradeep rangasamy M 28000
minu tiwari f 22000
abjith dasgupta M 35000
Ganesh majumdar M 50000
himadri bhuyan M 20000
gurunath reddy M 40000
order by salary,gender
◯ no rows returned
⚫1
◯3
◯2
3. How many seconds will a 500 metre long train take to cross a man walking with a (1 point)
speed of 3 km/hr in the direction of the moving train if the speed of the train is 63
km/hr?
EXAMPLE : 42
30
ii) All the SELECT queries in the UNION must be against the same table
iii) UNION and UNION ALL will give the same result when the participating
SELECT queries are mutually exclusive.
5. In a group of buffaloes and ducks, the number of legs are 24 more than twice the (1 point)
number of heads. What is the number of buffaloes in the group?
Example : 11
12
Round(to_date('
______________
What is the value that needs to be put in the blank to get the result ?
◯ 01-JAN-2008
◯ 01-NOV-2008
⚫ 01-JAN-2009
◯ 01-OCT-2008
7. What is the value of ‘comm’ ,'sal',and ‘netsal’ after executing the following query if (1 point)
the initial value of ‘sal’ is 10000? (ASSUME comm and netsal coumns have null
values)
Table 1 : DEPT
LOC (VARCHAR2(13)
Table 2 : EMP
MGR is the empno of the employee whom the employee reports to. DEPTNO is a
foreign key.
what is the sql query that finds the most recently hired employee details in each
department.
◯ SELECT * FROM EMP WHERE (DEPTNO, HIREDATE) IN
ProductB 2 Texas 5
ProductC 3 Wilington 5
ERP 10 Delaware 4
Reorg 20 Wilington 1
Newbee 30 Delaware 4
pname
-----------------
ERP
Newbee
◯ SELECT pname FROM TABLE emp project WHERE dnumber = 10;
⚫ SELECT pname FROM emp project WHERE dnum = 4;
◯ SELECT pname FROM TABLE emp project as dnum = 4;
◯ SELECT pname FROM emp project FOR dnum = 4;
12->34->26->67->98
What would be the state of the linked list when the following Python function is
invoked by passing the head node of the above linked list and 3?
----Assumption: All the references to the necessary files are available
◯ 98->34->26->67->12
⚫ 12->34->26->67->98
◯ 26->34->12->67->98
◯ 67->34->26->12->98
13. Identify the correct answer for the given statements (1 point)
ii) DISTINCT keyword is used to not allow duplicate values when you create data
⚫ i-true, ii-false
◯ i-false, ii-true
◯ i-false, ii-false
◯ i-true, ii-true
SQL QUERY
What are the values that need to be put in the blanks to complete execution of
query given below ?
◯ hh:ss
◯ hh:mm
⚫ hh:mi
◯ hh:mn
16. What will be the status of output_stack after execution of above code? (1 point)
Note: Consider that the elements of stack in the options are shown from top to
bottom
◯ 11SouthAfrica-->18England-->27Australia-->32India
◯ 5India-->9Australia-->7England-->11SouthAfrica
◯ 11SouthAfrica-->7England-->9Australia-->5India
⚫ 32India-->27Australia-->18England-->11SouthAfrica
17. What is the output of following function when head node of following linked list is (1 point)
passed as input?
1->2->3->4->5->6
def fun(head):
if(head==None):
return
print(head.get_data()," ",end='')
if head.get_next().!= None:
fun(head.get_next().get_next())
18. A tank is filled in 5 hours by three pipes A, B and C. The pipe C is twice as fast as (1 point)
B and B is twice as fast as A. How much time will pipe A alone take to fill the
tank?
example : 22hrs
35hrs
queue.enqueue(0)
queue.enqueue(1)
for I in range(0,n):
a= queue.dequeue()
b= queue.dequeue()
queue.enqueue(a)
queue.enqueue(a+b)
print(a)
◯ Prints numbers from n-1 to 0
◯ Prints first n Fibonacci numbers in reverse order.
⚫ Prints first n Fibonacci numbers
◯ Prints numbers from 0 to n-1
20. Arun, Kamal and Vinay invested Rs. 8000, Rs. 4000 and Rs. 8000 respectively in a (1 point)
business. Arun left after six months. If after eight months, there was a gain of Rs.
4005, then what will be the share of Kamal?
Examples: 325
890
21. Train A takes 1 hour more than train B to travel a distance of 720 km. Due to (1 point)
engine trouble speed of train B falls by one third, so it takes 3 hours more than
Train A to complete the same journey. What is the speed of Train A (in km/hr)?
Example: 60
80
22. A can do a piece of work in 12 days and B in 16 days. A began the work alone, (1 point)
After some days B joined the work. The work was completed in 9 days, in all. How
many days before the completion of the work did B join the work?
Example : 22
4
23. Ram borrows Rs. 3000 at 10% compound rate of interest. At end of each year he (1 point)
pays back Rs. 1000. How much amount should he pay at the end of the third year
to clear all his dues?
Example: 52
1683
24. A shopkeeper bought 80 kg of sugar at the rate of Rs 13.5 per kg. He mixed it with (1 point)
120 kg of sugar costing Rs 16 per kg. In order to make a profit of 20%, he must sell
the mixture at:
Example : 21
18
25. Rs. 600 amounts to Rs. 720 in 4 years at simple interest. If the interest rate is (1 point)
increased by 5% of itself. How much would it amount?
Example : 624
726
26. What will be the output of the below Python code? (1 point)
if(key in sample):
res=True
sample .update({key:val})
res=False
res=None
print(sample["X"], res)
◯ 0 None
◯ 2 None
⚫ 0 True
◯ 2 False
27. Consider the following list of numbers to be sorted using bubble sort in ascending (1 point)
order.
At the end of 3rd pass what will be status of the above list?
Suppose merge sort algorithm is used to sort the above list of numbers in ascending
order, how many times lists will be merged?
◯1
⚫7
◯0
◯5
29. Consider the list of numbers given below which should be sorted in ascending (1 point)
order:
91 68 12 83 72 3 47 65
3 12 47 65 72 91 68 83
◯ bubble sort
⚫ selection sort
◯ merge sort
◯ quick sort
31. What would be the output of the below Python code (1 point)
list1=[10,20,0,40,0]
def test ( ) :
try :
i=3
if(listl[i]/listl[i+l]>l): value=i+l
finally :
print("4")
print("5")
test()
◯1
5
⚫1
5
◯2
5
◯1
1->4->6->7->9
What would be the state of the linked list when the following Python function is
invoked by passing the head node of the above linked list and 5?
Assumption: All the references to the necessary files are available. Method
get_next() returns the link to the next node. Method get_data() returns data of the
node.
◯ 1->4->6->7->7
◯ 7->4->6->7->7
◯ 1->4->6->7->9
⚫ 7->4->6->7->9
45 56 79 81 82 94 108
Identify the search algorithm which will be able to find the element 79 in 4
iterations
1. Linear Search
2. Binary Search
◯ only 1
◯ only 2
⚫ Both 1 & 2
◯ Neither 1 or 2