HCU PHD CS MAY 2012

Question 1
In DBMS the projection operation creates a new table that has
A
more tuples than the original table
B
more attributes than the original table
C
both of A and B above
D
none of the above
Question 1 Explanation: 
In DBMS the projection operation creates a new table that has less than or equal no. of tuples and less no. of attributes than the original table.
Question 2
A locked file can be
A
accessed by a user having correct password
B
accessed by one user
C
used to hide data
D
none of the above
Question 2 Explanation: 
File locking is a mechanism that restricts access to a computer file, or to a region of a file, by allowing only one user or process to modify or delete it in a specific time and to prevent reading of the file while it's being modified or deleted.
Question 3
The length of a Hamiltonian path (if exists) in a simple connected graph of n vertices is
A
n+1
B
n-1
C
n
D
None of the above
Question 3 Explanation: 
Hamiltonian path is a path in a graph that visits each vertex exactly once.
So if each vertex is visited exactly once then to cover those vertices exactly n-1 edges are required,because if vertices are not repeated then edge will also be not repeated.
Question 4
A network schema is different from a hierarchical schema, for, it allows
A
one parent - one child
B
one parent - many children
C
many parents - many children
D
both of A and B above only
Question 4 Explanation: 
While the hierarchical database model structures data as a tree of records, with each record having one parent record and many children, the network model allows each record to have multiple parent and child records, forming a generalized graph structure.
Question 5
A binary search tree (BST) is built by inserting the following values in the given order: 4,25,15,12,20,70,40. The Post Order. Traversal will be
A
12, 15, 20, 40,70,25, 4
B
12, 20,15, 40, 70, 25, 4
C
4, 25,70, 40, 15, 12,20
D
4, 12, 15, 20, 25, 40,70
Question 5 Explanation: 
The given sequence is,
4, 25, 15, 12, 20, 70, 40
Now let’s draw binary search tree for above sequence,

The post order traversal for above BST is,
12, 20, 15, 40, 70, 25, 4.
Question 6
If N is an n-bit number, how many bits long is N!, approximately?
A
nlogn
B
n!
C
2n
D
n2
E
None of the given option is correct.The correct answer is n*2^n.
Question 6 Explanation: 
Question 7
Which one of these sorting algorithms involves minimum record swaps during execution on an average?
A
bubble sort
B
insertion sort
C
selection sort
D
quicksort
Question 7 Explanation: 
Selection sort algorithm involves minimum no. of records swap on an average and also in worst case. In selection sort the average or worst case no. of swaps is O(n).
Whereas in Bubble sort tha average no. of swaps is O(n^2) , in insertion sort it is O(n^2), and in quick sort it is O(nlogn).
Question 8
The solution of the recurrence relation T(n)=3T(n/2)+Θ(n), for n ≥ 2, T(1)=0, is
A
Θ(nlog_2^3)
B
Θ(n log n)
C
Θ(n)
D
Θ(n2)
Question 8 Explanation: 
Question 9
All IP addresses in the range 186.220 .64.0 to 186.220.71.254 arc kept in a VLAN. The correct netmask so that messages are broadcast only within this VLAN is
A
186.220.255.255
B
186.220.248.0
C
186.220.248.255
D
186.220.8.0
Question 9 Explanation: 
Let check option wise,




Question 10

On a Linux system, a person found that it is possible to display the contents of a file named /usr/foo/public/award.html but could not list the files in the directory using is /usr/foo/public.

The permissions on the directory may have been
A
rwxr-x--x
B
rwxr-xr--
C
rwrxr-xr-x
D
None of the Above
Question 11
The first four bytes of a binary file are CA , FE, BA, BE (in Hexadecimal, of course!). What type of a file is it?
A
MSWindows .exe file
B
IUSWindows .com file
C
Java Class file
D
BNIP Image file
Question 12
For which of the following problems can a Turing Machine not be designed?
A
Find if there exists a sequence of 7 consecutive 7's in the decimal expansion of 22/7
B
Find if there exists a sequence of 7 consecutive 7’s in the decimal expansion of π
C
Find if there exists a sequence of 7 consecutive 7’s in the quotient obtained by dividing all positive integers less than 1064 by the number 125
D
None of the Above
There are 12 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access