0% found this document useful (0 votes)
69 views27 pages

Telegram

Uploaded by

kj2jbxr7pc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views27 pages

Telegram

Uploaded by

kj2jbxr7pc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Mockwarriors

Topic Test – ER Diagram (DBMS)


Specially Design For RPSC Programmer Exam
Time – 20 Minutes. Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1. For a weak en ty set to be meaningful, it must be associated with another en ty set in combina on
with some of their a ribute values, is called as:
a)Neighbour Set
b)Strong En ty Set
c)Owner En ty Set
d)Weak Set

Q2. The informa on related to data in a database is refer as


a) Knowledge
b) Wisdom
c) Big Data
d) Metadata

Q3. What is the minimum number of tables needed for the above ER diagram?

a) 3
b) 4
c) 5
d) 6

Q4. Consider the following Relationship Entity Diagram (ERD) After Minimizing this ER diagram we will
convert it into relational model. How many attributes will be created in ‘Includes’ Table?
a) 1
b) 2
c) 3
d) 4

Q6. R is rela onship with 1: 1 cardinality, 30% Null Values at E1 end, 70% Null Values at E2 end which is
the best possible design?
a). E1 and E2 kept separate with foreign key at E1 end
b). E1 and E2 kept separate with foreign key at E2 end
c). E1 and E2 kept separate with foreign key at E1 as well as E2
d). E1 and E2 merges into a single table with no foreign key

Q7. The data base administrator(DBA) is, in effect, the coordinator between the and the
a) DBMS, data base
b) applica on program, data base
c) data base, users
d) applica on programs, users

Q8. Which of the following statements is false about weak en ty set?


a)Weak en es can be deleted automa cally when their strong en ty is deleted
b)Weak en ty set avoids the data duplica on and consequent possible inconsistencies caused by
duplica ng the key of the string en ty
c)A weak en ty set has no primary keys unless a ributes of the strong en ty set on which it depends are
included
d)Tuples in a weak en ty set are not par oned according to their rela onship with tuples with a strong
en ty set

Q9. Which of the following architecture is mostly used for Local Machine?
a) 2 er architecture
b) 1 er architecture
c) 3 er architecture
d) Applica on architecture

Q10. In an En ty-Rela onship (ER) model, suppose R is a many-to-one rela onship from en ty set E1 to
en ty set E2. Assume that E1 and E2 par cipate totally in R and that the cardinality of E1 is greater that
the cardinality of E2. Which one of the following is true about R?
a)Every en ty in E2 is associated with at most one en ty in E1.
b)Some en ty in E1 is associated with more than one en ty in E2.
c)Every en ty in E2 is associated with exactly one en ty in E1.
d)Every en ty in E1 is associated with exactly one en ty in E2.

Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Topic Test – Normalization (DBMS)
Specially Design For RPSC Programmer Exam
Time – 15 Minutes. Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1. Given relation schema: Exam(futureProgrammer,RPSC).


What is the highest normal form satisfied by the "Exam" relation schema?
a) 1NF
b) 2NF
c) 3NF
d) BCNF

Q2. Given a relation 'S',all of its candidate keys are singletons.If S is in 3NF then S is:
a) 1NF
b) 2NF
c) 3NF
d) BCNF

Q3. A prime attribute of a relation schema R is an attribute that appears:


a) in all candidate keys of R
c) in some candidate key of R
b) in a foreign key of R
d) only in the primary key of R

Q4. Which of the following normal form(s) is not based on the functional dependencies among the
attributes of a relation?
a) 1NF
b) 2NF
c) 3NF
d) 4NF

Q5. Given a relation R(A, B, C, D, E) and keys are(A, AB, AC)


which of the Following will be concluded From the above information:
a) 1NF
b) 2NF
c) 3NF
d) BCNF

Q6. From the following instance of a relation schema R(A, B, C), we can conclude that:
A B C
1 1 1
1 1 0
2 3 2
2 3 2
a) A functionally determines B and B functionally determines C
b) A functionally determines B and B does not functionally determine C
c) A does not functionally determine C
d) All of the above are correct

Q7. Consider the relation given below and find the maximum normal form applicable to them
1. R(A, B) with productions {A→B}
2. R(A, B) with productions {B→A}
3. R(A, B) with productions {A→B, B→A}
4. R(A, B, C) with productions {A→B, B→A, AB→C}
a) 1, 2 and 3 are in 3NF and 4 is in BCNF
b) 1 and 2 are in BCNF and 3 and 4 are in 3NF
c) All are in 3NF
d) All are in BCNF

Q8. For a database relation A(P, Q, R, S) where the domains of P, Q, R, and S include only atomic values,
and only the following functional dependencies and those that can be inferred from them hold:
P→R and Q→S The relation is in.
a) First normal form but not in second normal form
b) Second normal form but not in third normal form
c) Third normal form
d) BCNF

Q9. Consider the following statement


S1: Canonical cover may not be unique.
S2: F = {ABC, AB, B → A). Canonical cover of F is unique
Which of the above statement is true?
a) Both S1 and S2 true
b) S1 is true and S2 is false
c) S1 is false and S2 is true
d) Both S1 and S2 are false

Q10. Given the following FD set on R(A, B, C) F = {A→BC, B→C, A→B, AB→C}
The canonical cover of this set is:
a) A→B and B→C
b) A→BC and B→C
c) A→BC and A→B
d) B→BC and AB→C

Ansker Key will Be updated Here


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Topic Test – Keys (DBMS)
Specially Design For RPSC Programmer Exam
Time – 15 Minutes. Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1. Let R(ABCDEF) be a relational schema and F={AB→CD, ABC→E,C→A}. The number of candidate keys
are:
a) 16
b) 18
c) 12
d) 22

Q2. Consider a relation R with the schema R (P, Q, R, S, T, U) with a set of functional dependencies FD as
follows:
{PQ→R,R→S,S→PQ} Find number of SuperKey and Number of Candidate Key ?
a) 12, 3
b) 13, 3
c) 16, 3
d) 20, 2

Q3. What is the maximum number of super keys for the relation R1(A, B, C, D, E) if each attribute of
relation is candidate key ?
a) 32
b) 31
c) 16
d) 15

Q4. What is the Range of Superkey if Maximum n number of candiate key is present ?
a) 1 < | SuperKey | < n
b) 1 ≤ | SuperKey | ≤ n
c) 1 < | SuperKey | < n-1
d) 1 ≤ | SuperKey | ≤ n-1

Q5. Given the relational schema R(A, B, C, D, E) with the following functional dependencies. A→B, BD→E,
C→AD, E→C Find which of the following is not a candidate key?
a) E
b) BD
c) C
d) A

Q6. In the relation R(W, X, Y, Z) with functional dependencies F = {WX → YZ, Y → W, Z→ X).
How many number of candidate keys are there for the above relation?
a)2 b)3 c)4 d) None
Q7. Which of the following Statement is Correct:
a) An alternate key is a candidate key that is not a primary key
b) An alternate key is a primary key that is not a candidate key
c) An alternate key is a candidate key that is also a primary key
d) None of the above

Q8. Redundancy is dangerous as it is a potential threat to data


a) Consistency
b) Integrity
c) Sufficiency
d) Both (a) and (b)

Q.9 Given the relational schema R(A,B,C,D) with the following candidate key {A, AB, ABC},
How many Possible Super Key ?
a) 8
b) 10
c) 12
d) 16

Q.10 Consider the following statements M1 and M2 about the relational data model:
M1: A relation scheme can have at most one foreign key.
M2: A foreign key in a relation scheme R cannot be used to refer to tuples of R.
Which one of the following choices is correct?
a) Both M1 and M2 are false.
b) Both M1 and M2 are true.
c) M1 is true and M2 is false.
d) M1 is false and M2 is true.

Ansker Key will Be updated Here


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Answer-Key – ER Diagram (DBMS)
Specially Design For RPSC Programmer Exam/IBPS SO
Answer Key Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1 C
Q2 D
Q3 B
Q4 C
Q5 -
Q6 A
Q7 C
Q8 D
Q9 B
Q10 D

Click Here To View Ques on Paper


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Answer-Key – Keys (DBMS)
Specially Design For RPSC Programmer Exam
Answer Key Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1 C (12),
Option
Corrected
Typing
Error
Q2 B
Q3 B
Q4 B
Q5 D
Q6 C
Q7 A
Q8 D
Q9 A
Q10 A

Click Here To View Question Paper


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Answer-Key – Normalization (DBMS)
Specially Design For RPSC Programmer Exam
Answer Key Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1 D
Q2 D
Q3 B
Q4 D
Q5 A
Q6 B,C
Q7 D
Q8 A
Q9 B
Q10 A

Click Here To View Question Paper


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Topic Test – Basic Java
Specially Design For RPSC Programmer Exam
Time – 15 Minutes. Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1. What is the output of the following code snippet?


int x = 20;
int y = 20;
int z = x++ + ++y;
System.out.println(z);
a) 41
b) 42
c) 43
d) 44

Q2. Which of the following is not a valid iden fier in Java?


a) $coder
b) _ programmer
c) 123programmer
d) programmer_123

Q3. Find the output of the following code:


public sta c void main(String args[])
{
int i = -1;
while (i < 5) {
System.out.print(i + " ");
i++;
}
}
a) -1 0 1 2 3 4
b) -1 1 2 3 4 5
c) 0 1 2 3 4 5
d) -1 2 3 4 5 6

Q4. which is the first line (if any) that causes a compila on error ?
public sta c void main(String args[])
{
char c;
int i;
c = 'A'; // 1
i = c; //2
c = i + 1; //3
c++; //
}
a) The line labeled 1.
b) The line labeled 2.
c) The line labeled 3.
d) The line labeled 4.

Q5. Which of these assignments are Not Valid ?


a) short s = 28;
b) float f = 2.3;
c) int I = '1';
d) byte b = 12;

Q6. Find the output of the following code:


public sta c void main(String args[])
{
byte x = 3;
x = (byte)~x;
System.out.println(x);
}
a) -1
b) -3
c) +3
d) -4

Q7. Find the output of the following code:


public sta c void main(String args[])
{
int x,y;
x = 1 & 8;
y = 3 ^ 5;
System.out.println(x + " " + y);
}
a) 0 6
b) 6 0
c) 8 0
d) 0 8

Q8. Find the output of the following code:


public sta c void main(String args[])
{
int x, y;
x = 5 >> 2;
y = x >>> 2;
System.out.println(y);
}
a) 1
b) 2
c) 3
d) 0

Q9. Find the output of the following code:


public sta c void main(String args[])
{
System.out.println(1/9 + 5/2 + 0.1);
}
a) 1.1
b) 2.1
c) 3.1
d) 3

Q10. Find the output of the following code:


public sta c void main(String args[])
{
int i = 5;
boolean t = true;
boolean f = false, b;
b = (t | ((i++) == 0));
b = (f | ((i+=2) > 0));
System.out.println(i);
}
a) 6
b) 7s
c) 8
d) 9

Ansker Key will Be updated Here


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Answer-Key – Basic Java
Specially Design For RPSC Programmer Exam
Answer Key Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1 A
Q2 C
Q3 A
Q4 C
Q5 B
Q6 D
Q7 A
Q8 D
Q9 B
Q10 C

Click Here To View Ques on Paper


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Topic Test – Basic Java Test 2
Specially Design For RPSC Programmer Exam
Time – 15 Minutes. Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1. What is the output of the following code:


class Mockwarriors{
public sta c void main(String[] args)
{
int a = 10;
int b = 20;
if (++a <= 10 && --b < 20) {}
System.out.println("a = " + a + " b = " + b);
a = 10;
b = 20;
if (++a <= 10 & --b < 20) {}
System.out.println("a = " + a + " b = " + b);
}
}
a) a = 11 b = 20
a = 12 b = 18
b) a = 11 b = 20
a = 11 b = 19
c) a = 10 b = 20
a = 11 b = 19
d) a = 11 b = 20
a = 11 b = 18

Q2. What is the output of the following code:


class Mockwarriors{
public sta c void main(String[] args)
{
int a = 10;
int b = 20;
if (++a <= 10 || --b < 20) {}
System.out.println("a = " + a + " b = " + b);
a = 10;
b = 20;
if (++a <= 10 | --b < 20) {}
System.out.println("a = " + a + " b = " + b);
}
}
a) a = 11 b = 20
a = 12 b = 18
b) a = 11 b = 20
a = 11 b = 19
c) a = 11 b = 19
a = 11 b = 19
d) a = 11 b = 20
a = 11 b = 18

Q3. What is the output of the following code:


class Mockwarriors {
public sta c void main(String args[]) {
int[] a = {1, 2, 3, 4, 5, 6};
int i = a.length - 1;
while (i >= 0) {
System.out.print(a[i]);
i--;
}
}
}
a) 654321
b) 6543210
c) 123456
d) 0123456

Q4. What is the output of the following code:


class Mockwarriors{
sta c int x = 10;
public sta c void main(String[] args)
{
for(int x=0;x<5;x++){}
System.out.print(x);
}
}
a) 10
b) 012345
c) 12345
d) 123456789

Q5. What is the output of the following code:


class Mockwarriors {
public sta c void main(String args[]) {
short p=1; // Line 1
short k=0; // Line 2
k=p+1; // Line 3
System.out.println(k);
}
}
a) 1
b) Error Because of Line 1
c) Error Because of Line 2
d) Error Because of Line 3

Q6. What is the output of the following code:


class Mockwarriors {
public sta c void main (String args[])
{
for (int i = 0; i < 3; i++)
{
for (int j = 3; j <= 0; j--)
{
if (i == j) con nue;
System.out.println(i + " " + j);
}
}
}
}
a) blank
b) 0
c) 321
d) 123

Q7. What is the output of the following code:


class Mockwarriors{
public sta c void main(String args[])
{
boolean x = true;
int a;
if(x) a = x ? 1: 2;
else a = x ? 3: 4;
System.out.println(a);
}
}
a) 1
b) 2
c) 3
d) 4

Q8. Which of the following is not legal iden fiers?


a) _4_
b) @name
c) getSize
d) $

Q9. Which of the following for loop declara on is not valid?


a) for ( int j = 7; j <= 77; j += 7 )
b) for ( int j = 20; j >= 2; --j )
c) for ( int j = 2; j <= 20; j = 2* j )
d) for ( int j = 99; j >= 0; j / 9 )

Q10. What is the output of the following code:


class Mockwarriors{
public sta c void main(String args[])
{
int x = 1;
int y = 2;
int z = x++;
int a = --y;
int b = z--;
b += ++z;
int answ = x>a?y>b?y:b:x>z?x:z;
System.out.println(answ);
}
}
a) 1
b) 2
c) 3
d) 4

Ansker Key will Be updated Here


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Answer-Key – Basic Java Test 2
Specially Design For RPSC Programmer Exam
Answer Key Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1 B
Q2 C
Q3 A
Q4 A
Q5 D
Q6 A
Q7 A
Q8 B
Q9 D
Q10 B

Click Here To View Ques on Paper


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Topic Test – Basic Java Test 3
Specially Design For RPSC Programmer Exam
Time – 15 Minutes. Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1. What is the default value of a char in Java?


a) '0'
b) ' '
c) '\u0000'
d) '\uffff'

Q2. Find the output:


class A {
int i;
}
class B extends A {
int j;
void display()
{
super.i = j + 1;
System.out.println(j + " " + i);
}
}
class inheritance
{
public sta c void main(String args[])
{
B obj = new B();
obj.i = 1;
obj.j = 2;
obj.display();
}
}
a) 2 3
b) 2 4
c) 4 3
d) 1 2

Q3. Redefining the super class method in the subclass is known as __


a) Dynamic Binding
b) Method Overloading
c) Method Overriding
d) None of These

Q4. Which of the following is a valid abstract class?


a) class A { abstract void test() {} }
b) class A { abstract void test(); }
c) abstract class A { abstract void test(); }
d) public class abstract A { abstract void test(); }

Q5. Which of the following declares an abstract method in an abstract Java class?
a) public abstract method();
b) public abstract void method();
c) public void method() {}
d) public void abstract Method();

Q6. Find the output:


class Mockwarriors {
public sta c void main (String args[])
{
byte x=1;
x+=11;
System.out.println(x);
}
}
a) 2
b) 12
c) 11
d) Compila on Error

Q7. Error Occurs Because of


class Mockwarriors {
public sta c void main (String args[])
{
byte x=1;
x+=11; // Line 1
x=x+10; // Line 2
x++; // Line 3
x--; // Line 4
System.out.println(x);
}
}
a) Line 1 and Line 2
b) Line 3 and Line 4
c) Only Line 2
d) Line 2, Line 3 and Line 4

Q8. Find the output:


class Mockwarriors {
void sum() {
int age=5;
System.out.println(age);
}
public sta c void main(String args[]) {
Mockwarriors test = new Mockwarriors();
test.sum();
}
}
a) 1
b) 0
c) 5
d) Compila on Error

Q9. Find the output:


class Mockwarriors {
sta c int age;
void sum() {
int age=5;
System.out.println(age);
}
public sta c void main(String args[]) {
Mockwarriors test = new Mockwarriors();
test.sum();
}
}
a) 1
b) 0
c) 5
d) Compila on Error

Q10. Modulus operator(%) In Java, can be applied to which of these?


a) Both Integers and floa ng – point numbers
b) Integers
c) Floa ng – point numbers
d) None of the men oned

Answer Key will Be updated Here


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Answer-Key – Basic Java Test 3
Specially Design For RPSC Programmer Exam
Answer Key Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1 C
Q2 A
Q3 C
Q4 C
Q5 B
Q6 B
Q7 C
Q8 C
Q9 C
Q10 A

Click Here To View Ques on Paper


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Topic Test – Basic Java Test 4
Specially Design For RPSC Programmer Exam
Time – 15 Minutes. Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1. What is the output of the following code:


class Mockwarriors{
public sta c void main(String[] args) { int a[][] = new int[3][];
a[1] = new int[]{1,2,3};
a[2] = new int[]{4,5};
System.out.print(a[1][1]);
}}
a) 1
b) 2
c) 3
d) 4

Q2. What is the output of the following code:


class Warriors{
void sum() {
sta c int age=5;
System.out.println(age);
}
public sta c void main(String args[]) {
Warriors test = new Warriors();
test.sum();
}
}
a) 5
b) 0
c) Compila on Error
d) Run me Error

Q3. What is the output of the following code:


class Warriors{
void sum() {
int Sta c=5;
System.out.println(Sta c);
}
public sta c void main(String args[]) {
Warriors test = new Warriors();
test.sum();
}
}
a) 5
b) 0
c) Compila on Error
d) Run me Error

Q4. What is the output of the following code:


class MockWarriors{
sta c {
char Char='A';
System.out.println(Char);
}
{
System.out.println("Instance Called");
}
public sta c void main(String args[]) {
}
}
a) A
b) A
Instance Called
c) Compila on Error
d) Run me Error

Q5. What is the output of the following code:


class MockWarriors{
sta c {
String Char="MockWarriors";
System.out.println(Char);
}
{
System.out.println("Join Our Telegram");
}
public sta c void main(String args[]) {
MockWarriors r= new MockWarriors();
new MockWarriors();
}
}
a) MockWarriors
Join Our Telegram
b) MockWarriors
Join Our Telegram
Join Our Telegram
c) No Output
d) MockWarriors
Join Our Telegram
Join Our Telegram
Join Our Telegram
Q6. What is the output of the following code:
class Warriors{
sta c {
String $="MockWarriors";
System.out.println($);
}
{
System.out.println("Join Our Telegram");
}
Warriors(){
System.out.println("Channel For More Content");
}
public sta c void main(String args[]) {
new Warriors();
}
}
a) Error
b) Join Our Telegram
Channel For More Content
c) No Output
d) MockWarriors
Join Our Telegram
Channel For More Content

Q7. What is the output of the following code:


class Warriors{
sta c {
new Warriors();
String $="MockWarriors";
System.out.println($);
}
Warriors(){
System.out.println("Join Our Community");
}
public sta c void main(String args[]) {
}
}
a) Error
b) Join Our Community
MockWarriors
c) MockWarriors
Join Our Community
d) No Output

Telegram- @Mockwarriors_itexam
Q8. What is the output of the following code:
class MockWarriors{
{
System.out.println("Finally Joined Our Community");
}
public sta c void main(String args[]) {
}
}
a) Finally Joined Our Community
b) no output
c) Run Time Error
d) Compila on Error

Q9. Which of the following is a correct method declara on in Java?


a) public int mockWarriors(int a, int b)
b) public mockWarriors(int a, int b): int
c) mockWarriors{int a, int b}
d) mockWarriors[int a, int b]

Q10. Which of the following is a correct method declara on in Java?


1) MockWarriors
2) _mockWarriors
3) 5mockWarriors
4) mockWarriors5

a) Only 2
b) Both 1 and 2
c) Both 1, 2 and 4
d) Only 3

Answer Key will Be updated Here


Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com
Mockwarriors
Answer-Key – Basic Java Test 4
Specially Design For RPSC Programmer Exam
Answer Key Telegram- @Mockwarriors_itexam www.MOCKWARRIORS.com

Q1 B
Q2 C
Q3 A
Q4 A
Q5 B
Q6 D
Q7 B
Q8 B
Q9 A
Q10 C

Telegram- @Mockwarriors_itexam
www.MOCKWARRIORS.com

You might also like