• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

ISRO CS 2015

Question 21

Let R = (A, B, C, D, E, F) be a relation schema with the following dependencies C->F, E->A, EC->D, A->B. Which of the following is a key of R?
  • CD
  • EC
  • AE
  • AC

Question 22

If D1, D2...Dn are domains in a relational model, then the relation is a table, which is a subset of
  • D1⊕D2⊕...⊕Dn
  • D1xD2x...xDn
  • D1∪D2∪...∪Dn
  • D1∩D2∩...∩Dn

Question 23

Consider the following relational schema:
Suppliers(sid:integer, sname:string, city:string, street:string)
Parts(pid:integer, pname:string, color:string)
Catalog(sid:integer, pid:integer, cost:real)
Consider the following relational query on the above database:
SELECT S.sname
    FROM Suppliers S
        WHERE S.sid NOT IN (SELECT C.sid
                            FROM Catalog C
                            WHERE C.pid NOT IN (SELECT P.pid  
                                                FROM Parts P
                                                WHERE P.color<> \'blue\'))
Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?
  • Find the names of all suppliers who have supplied a non-blue part.
  • Find the names of all suppliers who have not supplied a non-blue part
  • Find the names of all suppliers who have supplied only non blue parts.
  • Find the names of all suppliers who have not supplied only non-blue parts.

Question 24

Consider the following schema:
Emp (Empcode, Name, Sex, Salary, Deptt)
A simple SQL query is executed as follows:
SELECT Deptt FROM Emp
WHERE sex = \'M\'
GROUP by Dept
Having avg (Salary) > {select avg (Salary) from Emp}
The output will be
  • Average salary of male employee is the average salary of the organization
  • Average salary of male employee is less than the average salary of the organization
  • Average salary of male employee is equal to the average salary of the organization
  • Average salary of male employee is more than the average salary of the organization

Question 25

Given the following expression grammar:
E → E ∗ F ∣ F + E ∣ F
F → F − F ∣ id
Which of the following is true?
  • * has higher precedence than +
  • - has higher precedence than *
  • + and - have same precedence
  • + has higher precedence than *

Question 26

The number of tokens in the following C statement is printf("i=%d, &i=%x", i,&i);

  • 13

  • 6

  • 10

  • 9

Question 27

Which grammar rules violate the requirement of the operator grammar? A, B, C are variables and a, b, c are terminals
1) A → BC
2) A → CcBb
3) A → BaC
4) A → ε
  • 1 only
  • 1 and 2 only
  • 1 and 3 only
  • 1 and 4 only

Question 28

Which one of the following is a top-down parser?
  • Recursive descent parser
  • Shift left associative parser
  • SLR(k) parser
  • LR(k) parser

Question 29

Yacc stands for
  • yet accept compiler constructs
  • yet accept compiler compiler
  • yet another compiler construct
  • yet another compiler compiler

Question 30

Which statement is true?

  • LALR parser is more powerful and costly as compare to other parsers

  • All CFG\'s are LP and not all grammars are uniquely defined

  • Every SLR grammar is unambiguous but not every unambiguous grammar is SLR

  • LR(K) is the most general back tracking shift reduce parsing method

There are 80 questions to complete.

Last Updated :
Take a part in the ongoing discussion