Consider the relation R(a1, a2, a3, ……, an) with ‘n’ number of attributes. How many number of candidate keys are possible for R?
(2^n)-1
2^(n-1)
2^n
(2^n)+1
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following ER diagram.

If we convert the above diagram into the relational model, then which of the following is/are valid the attributes set for the relations? [MSQ]

Roll_no, Mob_no
Roll_no, Email_id
Mob_no, Email_id, Roll_no
Roll_no, Age, Mob_no, Email_id
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Which of the following statement(s) is/are CORRECT about strict schedules?

S1: All strict schedules are cascadeless

S2: All cascadeless schedules are recoverable

Both S1 and S2
Only S1
Only S2
Neither S1 nor S2
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Which among the following 2-phase locking protocols is a deadlock free?
Basic 2PL
Strict 2PL
Rigorous 2PL
Conservative 2PL
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Which of the following is INCORRECT?
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the below relations R and S:

Number of rows returned by the expression RS is _____

2
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What normal form is the following relation in when only H, I can act as the key?

R(H,I,J,K,L,M,N,O)

H,I->J,K,L

J->M

K->N

L->O

1NF
2NF
3NF
BCNF
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
The following key values are inserted into a B+-tree in which order of the internal nodes is 3, and that of the leaf nodes is 2, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+-tree is initially empty. 10, 3, 6, 8, 4, 2, 1. The minimum number of times leaf nodes would get split up as a result of these insertions is
2
3
4
5
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the set F of functional dependencies for relation schema R = (A, B, C, D, E).

A → BC

CD → E

B → D

E → A.

Which of the following is a canonical cover for R?

A → BC, CD → E, B → D, E → A
A → B, CD → E, B → D, E → A
A → C, D → E, B → D, E → A
A → BC, CD → E, E → A
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider schema R = (A, B, C, D, E) with the functional dependencies set {A → BC, CD → E, B → D, E → A}. Suppose that we decompose the schema into (A, B, C) and (A, D, E).

Which of the following is CORRECT about the decomposition?

Lossless and dependency preserving
Lossless but not dependency preserving
Neither lossless nor dependency preserving
Dependency preserving by not lossless
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following schedule for transactions T1, T2 and T3:

S:R1(X), R2(Y), R3(Y), W2(Y), W1(X), W3(X), R2(X), W2(X)

Which of the following are not correct serialization of the aforementioned schedule?

T1-T3-T2
T2-T1-T3
T2-T3-T1
T3-T1-T2
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Hashing is an improvement over ___X___ data structure,

The X data structure is:

Direct Access Table
Array
Linked list
Balanced Binary Search Tree
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What will be the output of the following program? (marks: 1)

#include<stdio.h>

struct Fraction

{

int num;

int denom;

};

void main()

{

struct Fraction f1;

struct Fraction *fPtr;

fPtr = &f1;

f1.num = 3;

fPtr.num = 10;

printf("%d", f1.num);

}

3
10
Error
None
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
To search an element from a data structure it takes some time complexity in the worst case scenario as stated below. Choose the correct option among following:
Binary tree takes O(n) time
Binary Search Tree takes O(n) time
Balanced Binary search tree takes O(logn) time
Priority queue(min heap) takes O(n) time
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Consider an one dimensional integer array A whose index starts with 1. What is the address of A[6], if the base address is T and size of integer is S bytes?
T + 5*S
T + 6*S
S + 5*T
S + 6*T
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What does the following expression mean ?

char *(*(* a[N]) ( )) ( );

a pointer to a function returning array of n pointers to function returning character pointers.

a function return array of N pointers to functions returning pointers to characters
an array of n pointers to function returning pointers to characters
an array of n pointers to function returning pointers to functions returning pointers to characters.

Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
#include<stdio.h>

void abc(char *s)

{

if(s[0]=='\0')return;

abc(s+1);

abc(s+1);

printf("%c",s[0]);

}

int main()

{

abc("123");

}

What will be the output of the above code?

3332321
3323321
3323123
3333221
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66

The value of the following postfix expression after evaluation will be ______?

32 4 / 2 * 12 3 - +

25
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
What will be the output of the following program?

#include<stdio.h>

void main()

{

int a,b;

b=2;

for(a=1;a<6;a++)

{

a=a+2;

b=b+a-2;

}

printf("%d\n",b);

}

6
7
9
11
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33

A and B are storing head pointers of two lists. Using these given information which among the following operations can be performed?

Choose the correct options from the following: [MSQ]

computes the intersection of two lists.

computes the union of two lists

computes the difference of two lists.

computes the list by considering a node alternatively from each list.

Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00

What will be the output of the following program?

#include <stdio.h>

int main()

{

int a=10, b=20, c=30, d=40;

if(a<= b == d> c)

{

printf("TRUE");

}

else

{

printf("FALSE");

}

return 0;

}

TRUE
FALSE
Compiler error
Run time error
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33

#include<stdio.h>

void switch_check(int x)

{

switch(x)

{

case 0: printf("@");

case 1: printf("H");

case 2: printf("I");

case 3: printf("M");

case 4: printf("A");

case 5: printf("L");

case 6: printf("A");

case 7: printf("Y");

case 8: printf("A");

default: printf("!");

}

}

void main()

{

switch_check(2<<1 );

}

What is the output of the above code?

HIMALAYA!
ALAYA!
A
@HIMALAYA!
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Qualcomm snapdragon 720G processor can sort 200 entries which are initially in descending order in 200 sec using quick sort. The number of entries the same processor can sort in 250 sec using selection sort is__?
223.60
230.12
246.21
250
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
You have to sort 20 GB of data with only 2 GB of available main memory. Which sort should you use?
Heap Sort
Merge sort
Insertion sort
Quick Sort

Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Express the following recurrence relation in asymptotic notation

T(n) = 3T(n/3) + (√n)logn

O(√n)
O((√n)logn)
O(n)
O(nlogn)
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a graph G = (V, E). how many numbers of edges have to be removed to construct a spanning tree of graph.
E
1
E-V+1
E-V
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What will be the output after the third pass of bubble sort to sort the following number sequence in ascending order.

2, 6, 8, 1, 4, 3

2, 6, 1, 4, 3, 8
2, 1, 4, 6, 3, 8
1, 2, 4, 3, 6, 8
1, 2, 3, 4, 6, 8
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What is the worst case time complexity of the given algorithm

int bob(a, b)

if (a == b)

return a;

if (a > b)

bob(a - b, b);

else

bob(a, b - a);

O(n)
O(logn)
O(nlogn)
O(1)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following keys that are hashed into the hash table in the order given using the hash function.

h (k) = 1+k mod (m-1)

Assume the hash table has locations from 0 to 10.

Keys are 10, 22, 31, 4, 15, 28, 17, 27, 88, 59.

What is the key that is inserted at the location 0 Using linear probing

88
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Consider the following message:

PPP QQQQ P Q RRR SSSS RRRRR QQQ SS RRR

If Huffman tree code has left child with ‘1’ and right child with ‘0’ from every node then what is the decoded message for 1001010001.

RSPQR
RPQSR
RQPSR
RPQRR
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following graph representing a road map? [ MSQ ]

What are the common edges between minimum cost and maximum cost spanning tree?

(S6, S9)
(S8, S9)
(S7, S10)
(S2, S3)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Let A, B, C, D be four matrices of dimensions 10x5, 5x6, 6x7, 7x9 respectively. Find the difference between the maximum and minimum number of scalar multiplications required to find the product A B C D using the Matrix Chain Multiplication method is_____?
375
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Which of the following statements is/are TRUE? [ MSQ]
Consider a heap ‘H’. Each key in a heap is randomly increased or decreased by 1. Then we can restore the heap property on H in linear time O(n). The random choices are independent.
The problem of finding the shortest path from ‘s’ to ‘t’ in a directed, weighted graph exhibits optimal substructure.
A major disadvantage of merge sort is that it cannot easily be converted into a stable sort.
Heapsort can be used as the auxiliary sorting routine in radix sort, because it operates in place.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00