Q2.Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal
interviews to collect and collate economic data. Requirements: High School-pass, must be
available for Day, Evening and Saturday work. Transportation paid, expenses reimbursed.
Which one of the following is the best inference from the above advertisement?
Answer : Option CExplaination / Solution:
Gender is not mentioned in the advertisement and (B) clearly eliminated
Q3.Which of the following statements are TRUE about an SQL query?
P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
Q : An SQL query can contain a HAVING clause only if it has GROUP BY clause
R : All attributes used in the GROUP BY clause must appear in the SELECT clause
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
Answer : Option BExplaination / Solution:
If we use a HAVING clause without a GROUP BY clause, the HAVING condition applies to
all rows that satisfy the search condition. In other words, all rows that satisfy the search
condition make up a single group. So, option P is true and Q is false.
S is also true as an example consider the following table and query.
What will be the output of the following C program segment?
Char inChar = ‘A’ ;
switch (inChar ) {
case ‘A’ : printf (“Choice A\ n”);
case ‘B’ :
case ‘C’ : print f(“Choice B”);
case ‘D’ :
case ‘E’ :
default : printf (“No Choice”) ; }
Answer : Option CExplaination / Solution:
Since there is no ‘break’ statement , the program executes all the subsequent case statements
after printing “choice A”
Q6.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 number of bits in the tag field of an address is
Q7.Given the basic ER and relational models, which of the following is INCORRECT?
Answer : Option CExplaination / 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.
Q8.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 DExplaination / Solution:
The complete DFA is
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 DExplaination / 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.
Q10.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 AExplaination / Solution:
TAG controller maintains 16 + 4 = 20 bits for every block
Hence, size of cache tag directory = 20 × 213 bits =160 K bits
Total Question/Mark :
Scored Mark :
Mark for Correct Answer : 1
Mark for Wrong Answer : -0.5
Mark for Left Answer : 0