Computer Science Engineering - Online Test

Q1. The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are
Answer : Option C
Explaination / Solution:

Real time multimedia needs connectionless service, so under lying transport layer protocol used is UDP File transfer rums over TCP protocol with port no-21 DNS runs over UDP protocol within port no-53 Email needs SMTP protocol which runs over TCP protocol within port no – 25

Q2. A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?
Answer : Option B
Explaination / Solution:

Heap is a complete binary tree

Q3. Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE?
Answer : Option C
Explaination / Solution:

Process switching also involves mode changing.

Q4. A deterministic finite automation (DFA)D with alphabet ∑ = {a,b} is given below

Which of the following finite state machines is a valid minimal DFA which accepts the same language as D? 
Answer : Option A
Explaination / Solution:

Options B and C will accept the string b Option – D will accept the string “bba” Both are invalid strings. So the minimized DFA is option A

Q5. Given the basic ER and relational models, which of the following is INCORRECT?
Answer : Option C
Explaination / Solution:

The term ‘entity’ belongs to ER model and the term ‘relational table’ belongs to relational model. Options A and B both are true since ER model supports both multivalued and composite attributes. As multivalued attributes are not allowed in relational databases, in a row of a relational (table), an attribute cannot have more than one value.

Q6. Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below.

The missing arcs in the DFA are
Answer : Option D
Explaination / Solution:

The complete DFA is


Q7. Consider the following C code segment: 
int a, b, c = 0; 
void prtFun(void); 
main( )
{ static int a = 1;            /* Line 1 */
 prtFun( );
a + = 1;
 prtFun( )
printf(“\n %d %d “, a, b);
}
void prtFun(void)
{ static int a=2;               /* Line 2 */
int b=1;
a+=++b;
printf(“\n %d %d “, a, b);

What output will be generated by the given code segment if: 
Line 1 is replaced by auto int a = 1; 
Line 2 is replaced by register int a = 2;
Answer : Option D
Explaination / Solution:

Static local variables: Scope is limited to function/block but life time is entire program. 
Automatic local variables: Storage allocated on function entry and automatically deleted or freed when the function is exited. Register variables: Same as automatic variables except that the register variables will not have addresses Hence may not take the address of a register variable.
 

Q8. A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit. The size of the cache tag directory is
Answer : Option A
Explaination / Solution:

TAG controller maintains 16 + 4 = 20 bits for every block 
Hence, size of cache tag directory = 20 × 213 bits =160 K bits 

Q9.  Match the problem domains in Group I with the solution technologies in Group II
              Group I                                                                     Group II
(p) Services oriented computing                                      (1) Interoperability
(q) Heterogeneous communicating systems                    (2) BPMN
(R) Information representation                                         (3) Publish-find bind
(S) Process description                                                    (4) XML
Answer : Option C
Explaination / Solution:
No Explaination.


Q10. A computer handles several interrupt sources of which the following are relevant for this question. Interrupt from CPU temperature sensor Interrupt from Mouse Interrupt from Keyboard Interrupt from Hard Disk
Answer : Option D
Explaination / Solution:
No Explaination.