DeltaX Question
DeltaX Question
A person wants to visit some places. He starts from a vertex and then wants to visit every
vertex till it finishes from one vertex, backtracks and then explore other vertex from same
vertex. What algorithm he should use?
Depth First Search
Breadth First Search
Trim’s algorithm
None of the mentioned
With SQL, how do you select all the records from a table named "Persons" where the
"LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?
SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Persons
SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'
SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen'
What is the output of the code given below? Assume that main function returns 0.
True
False
Garbage value
Compile time error
The following C function takes a simply-linked list as input argument. It modifies the list by
moving the last element to the front of the list and returns the modified list. Some part of the
code is left blank. Choose the correct alternative to be added after the while loop.
q = NULL; p->next = head; head = p;
q->next = NULL; head = p; p->next = head;
head = p; p->next = q; q->next = NULL;
q->next = NULL; p->next = head; head = p;
O(n^2)
O(n*log(n))
O(log(n))
O(1)
O(n)
With SQL, how can you insert a new record into the "Persons" table?
INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
INSERT ('Jimmy', 'Jackson') INTO Persons
Which of the following can be used to get the remainder when an integer a is divided by
integer b?
a/b
b/a
a%b
b%a
The following function reverse() is supposed to reverse a singly linked list. There is one line
missing at the end of the function.
*head_ref = prev;
*head_ref = current;
*head_ref = next;
*head_ref = NULL;
10 20 10 20
10 20 10 garbage
Run Time Error
Compile time error
Consider a set of 5 processes whose arrival time, CPU time needed and priority(smaller the
number, higher the priority) are given below. If the CPU scheduling FCFS, the average
waiting time will be:
12.8 ms
8 ms
6 ms
None of the above
A doubly linked list is declared as given below. Where Fwd and Bwd represent forward and
backward link to the adjacent elements of the list. Which of the following segments of code
deletes the node pointed to by X from the doubly linked list, if it is assumed that X points to
neither the first nor the last node of the list?
In a full binary tree if number of internal nodes is I, then number of leaves L are?
L = 2I
L=I+1
L=l-1
L = 2I – 1
10
0
Compilation Error
Undefined
A complex problem which can be broken down into repeating sub-problems can be solved by
a method known as:
Recursion
Multithreaded Programming
Dynamic Programming
Functional Composition
Which of the following is the fastest storage unit?
Hard Disk Drive
Solid State Drive
CPU registers
Random Access Memory
Are logical operators in the C language evaluated with the short circuit?
True
False
Depends on the compiler
Depends on the standard
What are the worst case and average case complexities of a binary search tree?
O(n), O(n)
O(logn), O(logn)
O(logn), O(n)
O(n), O(logn)
In below program, what would you put in place of “?” to print “tax”?
arr
(arr+3)
(arr+4)
Not possible
The following numbers are inserted into an empty binary search tree in the given order: 10, 1,
3, 5, 15, 12, 16 What is the height of the binary search tree ?
3
4
5
6
A web cookie is a small piece of data
sent from user and stored in the server while a user is browsing a website
sent from a sever and stored in user’s machine
sent from root server to all servers
None of the above
The time required to examine the packet’s header and determine where to direct the packet is
part of
Processing delay
Queuing delay
Transmission delay
All of the mentioned
Web search engines stores information about many web pages by a ______.
Web Indexer
Web Crawler
Web Organizer
Web Router
How many distinct binary search trees can be created out of 4 distinct keys?
4
14
24
42
Following is C like pseudo code of a function that takes a number as an argument, and uses a
stack S to do processing. What does the below function do in general?
233
123
222
112