HCU PHD CS MAY 2013

Question 1
The adjacency matrix of a graph is non-symmetric. The simplest may be drawn conclusion that is
A
The graph is directed.
B
The graph is undirected.
C
The graph is disconnected.
D
The graph has cycles.
Question 1 Explanation: 
If the adjacency matrix of the graph is non symmetric then definitely graph is directed,because in undirected graph if there is a path from vertex A to vertex B then there will definitely a path from vertex B to vertex A,and hence the adjacency matrix of undirected graph will be symmetric.
Question 2

What is the radix of the numbers if the solutions to the quadratic equation

x2 - 10x + 31=0

are x=5 and x=8?
A
11
B
13
C
10
D
None of the above.
Question 2 Explanation: 
Let radix be ‘b’.
For the quadratic equation
ax2 + bx + c
Product of roots is = c/a
So from question the quadratic equation given is,
x2 - 10 + 31 = 0
and the roots given are
5, 8
Question 3
Agile software development is NOT based on
A
Incremental Development
B
Cross Functional Teams
C
Detailed project plan
D
Iterative Development
Question 3 Explanation: 
Agile software development is a group of software development methodologies based on iterative and incremental development, where requirements and solutions evolve through collaboration between self-organizing, cross-functional teams. The Agile Manifesto introduced the term in 2001.
Question 4

Consider the following SQL schema for a database about schoors in a university and departments in the schools. Data types are omitted for brevity.

create table School (schoolName primary key, dean)

create table Dept (deptName primary key,

schoolName references School on delete cascade)

Write a single SQL statement that deletes all schools with more than 10 departments and also deletes all departments in those schools.
A
delete from School
where 10<(select count (*) from School
where Dept.schoolName=School.schoolName)
B
delete from School
where 10 < (select count (*) from Dept
where Dept.schoolName=school.schoorNanre)
C
delete from School
where 10 <= (select count (*) from Dept
Dept.schoonName=School.schoolName)
D
None of the above.
Question 4 Explanation: 
Option B is the correct SQL query.
Option A is wrong because the subquery contains School schema instead of Dept schema.
Option C is wrong because in question it is clearly said “more than 10” and not “more than or equal to 10”.
Question 5

A machine uses a 16-bit two's complement representation for integers and little endian byte ordering, that is, the least significant byte of an integer is stored at the lower address. show what the following program will print out:

int x; /* 16-bit signed integer */

char *cp = (char *) &x;

x = 0x0013;

printf(“x is %d\n', , x) ;

printf(“%d %d\n”, p[0], p[1] );
A
x=:919 0
B
x=199 0
C
x=99 0
D
None of the above.
Question 6

The phases in the software development process are listed below in arbitrary order:

(a) Design

(b) Test

(c) Code

(d) Requirements Analysis

(e) Maintenance

(f) Deployment

The correct ordering is
A
a,b,c,d,e,f
B
d,a,c,b,f,e
C
b,c,f,a,d,e
D
d,a,c,b,e,f
Question 6 Explanation: 
There are following six phases in every Software development life cycle model:
* Requirement gathering and analysis.
* Design.
* Implementation or coding.
* Testing.
* Deployment.
* Maintenance.
Question 7
Which of the following is NoT true about design patterns?
A
They are templates that can be used in different situations
B
They are formalized best practices
C
They can be directly transformed into code
D
None of the above.
Question 7 Explanation: 
In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design. It is not a finished design that can be transformed directly into source or machine code. Rather, it is a description or template for how to solve a problem that can be used in many different situations. Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.
Question 8
Data items grouped together for storage purposes are called
A
Title
B
List
C
String
D
Record
Question 8 Explanation: 
Data items grouped together for storage purposes are called records.
Question 9
Testing which is performed after modification to the existing system is known as
A
Regression testing
B
Acceptance testing
C
Integration testing
D
Black-box testing
Question 9 Explanation: 
Testing an application as a whole for the modification in any module or functionality is termed as Regression Testing. It is difficult to cover all the systems in Regression Testing, so typically Automation Testing Tools are used for these types of testing.
Question 10
In DBMS, two files may be joined into a third file, if
A
they have a row in common
B
they have a field in common
C
they have no records with the same value in common field
D
both B and C
Question 10 Explanation: 
In DBMS, two files may be joined into a third file, if they have a field in common
Question 11

The correct recurrence relation for computing the time-complexity of Towers of Hanoi problem is

where T(n) is the number of steps to solve the problem of size n.
A
T(n)=2T(n-1) + 1
B
T(n)=T(n-1) + 1
C
T(n)=T(n/2) + 1
D
T(n)=2T(n/2) + 1
Question 11 Explanation: 
Pseudo code for towers of hanoi is
TOH(n, x, y, z)
{
if (n >= 1)
{
TOH((n-1), x, z, y)
move:x→ y
TOH((n-1), z, y, x)
}
}
Recurrence relation for computing the time-complexity of Towers of Hanoi problem is
T(n)=2T(n-1) + 1
Question 12
An example of a consumable resource is
A
signal
B
text file
C
memory
D
printer
Question 12 Explanation: 
The resources that are depleted after the use by a process. Examples include Hardware interrupts, Unix signals, pthread_cond_signal calls, messages, and information in I/O buffers.
Question 13
Given the declarations: int *p and int a[12], which of the following is illegal in C?
A
P=a
B
a=p
C
*p=a[2]
D
P=NULL
Question 13 Explanation: 
We cant the change the address of ‘a’ because it is mnemonic and not any variable.
Question 14

What does the following code do?

a = a + b;

b = a - b;

a = a - b;
A
make a = a + b and b = a
B
make a = 0 and b = a
C
make a = b and b = a - b
D
swap the values of a and b
Question 14 Explanation: 
The following code swaps the values of ‘a’ and ‘b’. Take some examples of ‘a’ and ‘b’.
Question 15
Which of the following transitions between process states is generally disallowed in operating systems?
A
From run to ready state
B
From ready to run state
C
From wait to run state
D
From run to wait state
Question 15 Explanation: 
The transition from wait to run state is generally not allowed in operating system. But transition from wait to ready state and then from ready to run state is allowed.
Question 16
Fixed Partition allocation
A
Segmented Memory allocation
B
Paged Memory allocation
C
Fixed Partition allocation
D
Demand Paging
Question 17
Which of the following is usually a result of 'buggy' code?
A
Segmentation fault
B
Page fault
C
Cache fault
D
. None of the above.
Question 18

Which of the following is valid return value for a function fn in 'C' which is declared as

void fn(int, char *);
A
NULL
B
0
C
-1
D
None of the above
Question 18 Explanation: 
Void functions are created and used just like value-returning functions except they do not return a value after the function executes.
There are 18 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