Computer Science Engineering (Test 4)

Tancet Anna University : Cse, It Computer Science Engineering And Information Technology

| Home | | Tancet Anna University | | Cse, It Computer Science Engineering And Information Technology | | Computer Science Engineering |

Computer Science Engineering

Computer Science Engineering
| Digital Logic | | Computer Organization and Architecture | | Programming and Data Structures | | Algorithms | | Theory of Computation | | Compiler Design | | Operating System | | Databases | | Computer Networks |
Q.1
HTML (Hyper Text Markup Language) has language elements which permit certain actions other than describing the structure of the web document. Which one of the following actions is NOT supported by pure HTML (without any server or client side scripting) pages?
A. Embed web objects from different sites into the same page
B. Refresh the page automatically after a specified interval
C. Automatically redirect to another page upon download
D. Display the client time as part of the page
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report
Q.2
Determine the maximum length of cable (in km) for transmitting data at a rate of 500 Mbps in an Ethernet LAN with frames of size 10,000 bits. Assume the signal speed in the cable to be 2,00,000 km/s
A. 1
B. 2
C. 2.5
D. 5
Answer : Option B
Explaination / Solution:



Workspace
Report
Q.3
Which of the following is/are example(s) of stateful application layer protocols? (i) HTTP (ii) FTP (iii) TCP (iv) POP3
A. (i) and (ii) only
B. (ii) and (iii) only
C. (ii) and (iv) only
D. (iv) only
Answer : Option C
Explaination / Solution:

FTP and POP 3are stateful application layer protocols

Workspace
Report
Q.4
A system has n resources R0,…,Rn-1, and k processes P0,…..Pk-1. The implementation of the resource request logic of each process Pi. is as follows: 
if (i% 2==0) {
 if (i<n) request Ri;
 if (i+2<n)request Ri+2 ;
}
else {
 if (i<n) request Rn-i ;
 if (i+2<n)request Rn-i-2 ;
}
In which one of the following situations is a deadlock possible?
A. n = 40,k = 26
B. n = 21,k = 12
C. n = 20,k = 10
D. n = 41,k = 19
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Topic: Databases Tag: CS GATE 2011
Q.5
Consider a relational table with a single record for each registered student with the following attributes. 1. Registration_Number: Unique registration number for each registered student 2. UID: Unique Identity number, unique at the national level for each citizen 3. BankAccount_Number: Unique account number at the bank. A student can have multiple accounts or joint accounts. This attributes stores the primary account number 4. Name: Name of the Student 5. Hostel_Room: Room number of the hostel Which of the following options is INCORRECT?
A. BankAccount_Number is a candidate key
B. Registration_Number can be a primary key
C. UID is a candidate key if all students are from the same country
D. If S is a superkey such that S ∩ UID is NULL then S ∪ UID is also a superkey
Answer : Option A
Explaination / Solution:

In case two students hold joint account then BankAccount_Num will not uniquely determine other attributes.

Workspace
Report
Topic: Databases Tag: CS GATE 2012
Q.6
Which of the following assertions are CORRECT? 
P: Adding 7 to each entry in a list adds 7 to the mean of the list 
Q: Adding 7 to each entry in a list adds 7 to the standard deviation of the list 
R: Doubling each entry in a list doubles the mean of the list
S: Doubling each entry in a list leaves the standard deviation of the list unchanged 
A. P, Q
B. Q, R
C. P, R
D. R, S
Answer : Option C
Explaination / Solution:

P and R always hold true Else consider a sample set {1, 2, 3, 4} and check accordingly

Workspace
Report
Q.7
 Consider the relational schema given below, where eId of the relation dependentis a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation.
employee (empId, empName, empAge)
dependent (depId, eId, depName, depAge)
Consider the following relational algebra query

The above query evaluates to the set of empIds of employees whose age is greater than that of 
A. some dependent.
B. all dependents.
C. some of his/her dependents.
D. all of his/her dependents
Answer : Option D
Explaination / Solution:


Part A of the above given relational algebra query will give the set of empIds of those employees whose age is less than or equal to the age of some of his/her dependents. Now when set of empIds of all employees minus set of empIds obtained from part A is done, then we get the set of empIds of employees whose age is greater than that of all of his/her dependents.  

Workspace
Report
Q.8
 Consider a database that has the relation schemas EMP(EmpId, EmpName, DepId). And DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus.

Which of the above queries are safe? 
A. (I) and (II) only
B. (I) and (III) only
C. (II) and (III) only
D. (I), (II) and (III)
Answer : Option D
Explaination / Solution:

Query which generates infinite number of tuples is called unsafe query. In the given question all the given queries generate finite number of tuples.

Workspace
Report
Q.9
Match all items in Group I with correct options from those given in Group 2 
   Group 1                                     Group 2
P. Regular expression             1. Syntax analysis 
Q. Pushdown automata          2. Code generation 
R. Dataflow analysis               3. Lexical analysis 
S. Register allocation              4. Code Optimization
Codes: 
A. P-4, Q-1, R-2, S-3
B. P-3, Q-1, R-4, S-2
C. P-3, Q-4, R-1, S-2
D. P-2, Q-1, R-4, S-3
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.10
Consider the following table of arrival time and burst time for three processes P0, P1 and P2. 
Process   Arrival time       Burst Time 
  P0             0 ms                 9 ms 
  P1             1 ms                 4ms 
  P2             2 ms                 9ms 
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?
A. 5.0 ms
B. 4.33 ms
C. 6.33 ms
D. 7.33 ms
Answer : Option A
Explaination / Solution:


Average waiting time = (4+11)/3 = 5 ms

Workspace
Report


CSE, IT Computer Science Engineering and Information Technology