3i Infotech Papers: Sample Questions 685  686 of 1245
Examrace Placement Series prepares you for the toughest placement exams to top companies.
Question number: 685
Describe in Detail
What is Relational Algebra?
Explanation

The relational algebra is a theoretical procedural query language which takes instance of relations and does operations that work on one or more relations to describe another relation without altering the original relation.

So, both the operands and the outputs are relations, and so the output from one operation can turn into the input to another operation which allows expressions to be nested in the relational algebra.

The relational algebra is a relationatatime (or set) language where all tuples are controlled in one statement without the use of loop.

There are several variations of syntax for relational algebra commands and you use a common symbolic notation for the commands and present it informally.

The primary operations of relational algebra are as follows:

Select

Project

Union

Set different

Cartesian product

Rename

Question number: 686
Describe in Detail
main ()
{
int i = 3;
switch (i)
{
default: Printf ( “zero” );
case 1: Printf ( “one” );
break;
case 2: Printf ( “two” );
break;
case 3: Printf ( “three” );
break;
}
}
Explanation
In a program
int i = 3  Integer variable i = 3 
switch (i) { default: Printf (“zero”); case 1: Printf (“one”); break; case 2: Printf (“two”); break; case 3: Printf (“three”); break; }  The switch corresponding case 3 (since i = 3) is selected And as there is a break statement after it. It comes out of the loop And answer is three 