HCU PHD CS MAY 2013
Question 1 |
The adjacency matrix of a graph is non-symmetric. The simplest may be drawn conclusion that is
The graph is directed.
| |
The graph is undirected. | |
The graph is disconnected. | |
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?
11 | |
13 | |
10 | |
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
![](https://solutionsadda.in/wp-content/uploads/2020/05/Screenshot_532.png)
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
![](https://solutionsadda.in/wp-content/uploads/2020/05/Screenshot_532.png)
Question 3 |
Agile software development is NOT based on
Incremental Development | |
Cross Functional Teams | |
Detailed project plan | |
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.
delete from School where 10<(select count (*) from School where Dept.schoolName=School.schoolName) | |
delete from School where 10 < (select count (*) from Dept where Dept.schoolName=school.schoorNanre) | |
delete from School where 10 <= (select count (*) from Dept Dept.schoonName=School.schoolName) | |
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”.
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] );
x=:9 | |
x=19 | |
x=9 | |
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,b,c,d,e,f | |
d,a,c,b,f,e | |
b,c,f,a,d,e | |
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.
* Requirement gathering and analysis.
* Design.
* Implementation or coding.
* Testing.
* Deployment.
* Maintenance.
Question 7 |
Which of the following is NoT true about design patterns?
They are templates that can be used in different situations
| |
They are formalized best practices | |
They can be directly transformed into code | |
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
Title | |
List | |
String | |
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
Regression testing | |
Acceptance testing | |
Integration testing | |
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
they have a row in common | |
they have a field in common | |
they have no records with the same value in common field | |
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.
T(n)=2T(n-1) + 1 | |
T(n)=T(n-1) + 1 | |
T(n)=T(n/2) + 1 | |
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
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
signal | |
text file | |
memory
| |
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?
P=a | |
a=p | |
*p=a[2] | |
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;
make a = a + b and b = a | |
make a = 0 and b = a | |
make a = b and b = a - b | |
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?
From run to ready state | |
From ready to run state | |
From wait to run state | |
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
Segmented Memory allocation | |
Paged Memory allocation | |
Fixed Partition allocation | |
Demand Paging |
Question 17 |
Which of the following is usually a result of 'buggy' code?
Segmentation fault | |
Page fault | |
Cache fault | |
. 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 *);
NULL | |
0 | |
-1 | |
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.