Tuesday, March 13, 2012

Sokrati Placement paper NEW




1.
What does HTTP status code 500 mean?
[1 pts.]


Bad Request
Unauthorized
Internal Server Error
Forbidden

ans c

2.
Which of the following is the default port used for listening HTTP requests?
[1 pts.]

22
80
8080
23

Ans b

3.
In HTML which of the following tags can not be used inside a table tag?
[1 pts.]

th
footer
caption
tr

Ans b

4.
Which of the following method is not supported by HTTP protocol?
[1 pts.]


GET


PUT


DELETE


CREATE


Ans d

5.
What will be the output of the following javaScript code? var add = function(a,b) { return a+b; }; var mul = function(a, b) { var result = 0; for(var i=a; i>0; i--) result = operate(add, result, b); return result; }; function operate(operation, a, b) { return operation(a,b); } alert(operate(mul, 2, 3));
[1 pts.]


It will give an error


It will alert undefined


It will alert 6


It will alert 5


Ans c

6.
In an operating system when does a page fault occurs
[1 pts.]


when the page is not in the memory


when the page is in the memory


when the process enters the blocked state


when the process is in the ready state


Ans a

7.
When a process is created using fork(). what is shared between parent process and child process
[1 pts.]


heap


stack


shared memory segments


I/O handles


Ans c

8.
The time taken by the disk arm to locate the specific address of a sector for getting information is called?
[1 pts.]


Rotational Latency


Seek Time


Search Time


Response Time


Ans b

9.
In OSI network architecture, the routing is performed by
[1 pts.]


network layer


data link layer


transport layer


session layer


Ans a

10.
The interactive transmission of data within a time sharing system may be best suited to
[1 pts.]


simplex lines


half-duplex lines


full duplex lines


biflex-lines


Ans b

11.
What is the range of classA internet addresses?
[1 pts.]


0.0.0.0 - 127.255.255.255


128.0.0.0 - 191.255.255.255


192.0.0.0 - 223.255.255.255


224.0.0.0 - 239.255.255.255


Ans a

12.
Which of the following network applications uses User Datagram Protocol (UDP)
[1 pts.]


Domain Name System (DNS)


World Wide Web (WWW)


File Transfer Protocol (FTP)


Secure Shell


Ans a

13.
Which of the following network applications uses Transmission Control Protocol(TCP)?
[1 pts.]


Secure Shell


Domain Name System (DNS)


Voice Over IP (VOIP)


Trivial File Transfer Protocol (TFTP)


Ans a

14.
IP Addresses are converted to
[1 pts.]


A binary string


Alphanumeric string


A hierarchy of domain names


A hexadecimal string


Ans c

15.
Internet uses
[1 pts.]


Packet Switching


Circuit Switching


Cell Switching


Telex Switching


Ans a

16.
Data in a ring topology network
[1 pts.]


Flows in one direction only


Can skip over broken computers in the network


Is received by all tokens on the ring


Flows in many directions


Ans a

17.
In a database table how will you ensure that column creation_date is updated on row insertion?
[1 pts.]


Using procedure


Using index


Using trigger


Not possible


Ans c

18.
Database index can be implemented using
[1 pts.]


Array


Link list


Heap tree


B Tree


Ans d

19.
What is difference between primary key and unique key
[1 pts.]


Primary key is indexed, but unique key is not indexed


Both are same


Null value is not supported in the primary key, whereas it is supported in the unique key


Same value can be repeated in the primary key, whereas it can't be repeated in the unique key


Ans b

20.
Consider following tables: ----------- Employees ------------ Employee_id Employee_name Team_id ------- Teams ------- Team_id Team_name what type of relationship exists between the Employees table and the Teams table?
[1 pts.]


Employees - One , Teams - One


Employees - One, Teams - Many


Employees - Many, Teams - One


Employees - Many, Teams - Many


Ans c

21.
In a DB to avoid a costly table scan, which command or clause can be used?
[1 pts.]


Index command


Group by clause


Having clause


Where clause


Ans d

22.
A subquery in the sql select statement
[1 pts.]


Can only be used with two tables


Can always be duplicated by join query


has a distinct form that cannot be duplicated by a join


cannot have its results sorted using ORDER BY


Ans b

23.
Given following traversal of a tree (each char-represents one node), find which is the farthest from root: in-order => bxgadfnc pre-order => axbgfdcn
[1 pts.]


g


n


c


d


Ans b

24.
What are the minimum no of traversals required to retrieve n'th element from end in a singly-linked list?
[1 pts.]


1


2


3


4


Ans a

25.
Which of the following sorting algo has worst case time-complexity of O(n log n) and constant space-complexity?
[1 pts.]


Insertion Sort


Heap Sort


Bubble Sort


Quick Sort


Ans b

26.
Which of the following data-structures can be used to store list of numbers that would give the best performance in terms of time-complexity when a number needs to be searched
[1 pts.]


Singly Linked List


Sorted Array


Binary Search Tree


Array that maintains insertion order


Ans b

27.
In an AVL tree, at what condition the balancing is to be done?
[1 pts.]


When the height factor of a node is 0


When the height factor of a node is 1 or -1.


When the height factor of a node is 1


When the height factor of a node is not 0, 1 or -1


Ans d

28.
What is the space-complexity to store a graph in adjacency matrix representation
[1 pts.]


O(n^2);


O(n);


O(n log(n));


O(log (n))


Ans a

29.
What are the total number of nodes in a complete binary tree with n leaf nodes
[1 pts.]


2*h - 1


2*h + 1


2^h - 1;


2*h


Ans a

30.
What data-structure is used for supporting calling functions from within other functions?
[1 pts.]


Stack


Queue


Hash-table


Heap
             Ans a

0 comments:

Post a Comment