Questions 61–65 of 65. Imported answers require independent review unless marked reviewed.

Topic practice 65 questionsPage 7 of 7

Question 51

Open question
CSNAT2 marksNeeds review
A relational database contains two tables Student and Performance as shown below:
Student
Roll no.
Student name
1
Amit
2
Priya
3
Vinit
4
Rohan
5
Sita
Performance
Roll no.
Subject_code
Marks
1
A
86
1
B
95
1
C
90
2
A
89
2
C
92
3
C
80
The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together form the primary key. Consider the SQL query given below:
SELECT S.Student_name, sum(P.Marks) FROM Student S, Performance P WHERE P.Marks > 84 GROUP BY S.Student_name;
The number of rows returned by the above SQL query is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 52

Open question
CSNAT2 marksNeeds review
Consider the following C program:
#include <stdio.h>
int main(){
float sum = 0.0, j = 1.0, i = 2.0;
while (i/j > 0.0625){
j = j + j;
sum = sum + i/j;
printf("%f\n", sum);
}
return 0;
}
The number of times the variable sum will be printed, when the above program is executed, is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 53

Open question
CSNAT2 marksNeeds review
Consider the following C program:
#include <stdio.h>
int main()
{
int a[] = {2, 4, 6, 8, 10};
int i, sum = 0, *b = a + 4;
for (i = 0; i < 5; i++)
sum = sum + (*b - i) - *(b - i);
printf("%d\n", sum);
return 0;
}
The output of the above C program is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 54

Open question
CSNAT2 marksNeeds review
In an RSA cryptosystem, the value of the public modulus parameter n is 307. If it is also known that φ(n) = 288, where φ() denotes Euler’s Totient Function, then the prime factor of n which is greater than 50 is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 55

Open question
CSNAT2 marksNeeds review
Consider the following relations P(X,Y,Z), Q(X,Y,T) and R(Y,V).
P
X
Y
Z
X1
Y1
Z1
X1
Y1
Z2
X2
Y2
Z2
X2
Y4
Z4
Q
X
Y
T
X2
Y1
2
X1
Y2
5
X1
Y1
6
X3
Y3
1
R
Y
V
Y1
V1
Y3
V2
Y2
V3
Y2
V2
How many tuples will be returned by the following relational algebra query?

Answer: ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer