WorksheetsTechnical Test for BE-II
Total questions: 40
Worksheet time: 40mins
Name
Class
Date
1.
In the relational modes, cardinality is termed as:
a)
Number of tuples.
b)
Number of attributes
c)
Number of tables.
d)
Number of constraints
2.
Cartesian product in relational algebra is
a)
a Unary operator
b)
a Binary operator.
c)
a Ternary operator.
d)
not defined.
3.
An entity set that does not have sufficient attributes to form a primary key is a
a)
strong entity set.
b)
weak entity set.
c)
simple entity set.
d)
primary entity set.
4.
In tuple relational calculus P1 → P2 is equivalent to
a)
¬P1 ∨ P2
b)
P1 ∨ P2
c)
P1 ∧ P2
d)
P1 ∧ ¬P2
5.
Related fields in a database are grouped to form a
a)
data file.
b)
data record
c)
menu
d)
bank
6.
A report generator is used to
a)
update files.
b)
print files on paper.
c)
data entry.
d)
delete files.
7.
The DBMS language component which can be embedded in a program is
a)
The data definition language (DDL).
b)
The data manipulation language (DML).
c)
The database administrator (DBA).
d)
A query language.
8.
Which of these is not a part of Synthesis phase
a)
Obtain machine code corresponding to the mnemonic from the Mnemonics table
b)
Obtain address of a memory operand from the symbol table
c)
Perform LC processing
d)
Synthesize a machine instruction or the machine form of a constant
9.
Which of the following is not a key piece of information, stored in single page table entry, assuming pure paging and virtual memory
a)
Frame number
b)
A bit indicating whether the page is in physical memory or on the disk
c)
A reference for the disk block that stores the page
d)
None of the above
10.
Before proceeding with its execution, each process must acquire all the resources it needs is called
a)
hold and wait
b)
No pre-emption
c)
circular wait
d)
starvation
11.
Virtual memory is
a)
simple to implement
b)
used in all major commercial operating systems
c)
less efficient in utilization of memory
d)
useful when fast I/O devices are not available
12.
Page stealing is?
a)
is a sign of efficient system
b)
is taking page frames other working sets
c)
should be the tuning goal
d)
is taking larger disk spaces for pages paged out
13.
To avoid race condition, the maximum number of processes that may be simultaneously inside the critical section is
a)
zero
b)
one
c)
two
d)
more than two
14.
Which of the following are language processors?
a)
Assembler
b)
Compiler
c)
Interpreter
d)
All of the above
15.
4 ___________ is a technique of improving the priority of process waiting in Queue for CPU allocation
a)
Starvation
b)
Ageing
c)
Revocation
d)
Relocation
16.
Let A be an adjacency matrix of a graph G. The th ij entry in the matrix K A , gives
a)
The number of paths of length K from vertex Vi to vertex Vj.
b)
Shortest path of K edges from vertex Vi to vertex Vj.
c)
Length of a Eulerian path from vertex Vi to vertex Vj.
d)
Length of a Hamiltonian cycle from vertex Vi to vertex Vj.
17.
What is the following code segment doing? void fn( )
{ char c; cin.get(c);
if (c != ‘\n’)
{ fn( );
cout.put(c); }
}
{ char c; cin.get(c);
if (c != ‘\n’)
{ fn( );
cout.put(c); }
}
a)
The string entered is printed as it is.
b)
The string entered is printed in reverse order.
c)
It will go in an infinite loop.
d)
It will print an empty line.
18.
The postfix form of the expression (A + B)∗(C∗D − E)∗F / G is
a)
AB + CD∗E − FG /∗∗
b)
/ AB + CD ∗ E − F ∗∗G
c)
/ AB + CD ∗ E − ∗F ∗ G
d)
/ AB + CDE ∗ − ∗ F ∗ G
19.
Which of the following sorting algorithms does not have a worst case running time of ( ) 2 O n ?
a)
Insertion sort
b)
Merge sort
c)
Quick sort
d)
Bubble sort
20.
The maximum degree of any vertex in a simple graph with n vertices is
a)
n–1
b)
n+1
c)
2n–1
d)
n
21.
The complexity of searching an element from a set of n elements using Binary search algorithm is
a)
O(n)
b)
O(log n)
c)
O(n2 )
d)
O(n log n)
22.
An adjacency matrix represent
a)
nodes
b)
edges
c)
direction of edges
d)
parallel edges
23.
Quick sort is also known as
a)
merge sort
b)
heap sort
c)
bubble sort
d)
none of these
24.
One of the major drawback of B-Tree is the difficulty of traversing the keys sequentially.
a)
True
b)
False
25.
O(N) (linear time) is better than O(1) constant time.
a)
True
b)
False
26.
Which of the following operations is performed more efficiently by doubly linked list than by singly linked list?
a)
Deleting a node whose location in given
b)
Searching of an unsorted list for a given item
c)
Inverting a node after the node with given location
d)
Traversing a list to process each node
27.
Which of the following is true for the statement:
NurseryLand.Nursery.Students = 10;
NurseryLand.Nursery.Students = 10;
a)
The structure Students is nested within the structure Nursery
b)
The structure NurseryLand is nested within the structure Nursery.
c)
The structure Nursery is nested within the structure NurseryLand.
d)
)The structure Nursery is nested within the structure Students.
28.
Select the output for following set of code :
static void Main(string[] args)
{ 3. int a = 5;
fun1 (ref a);
Console.WriteLine(a);
Console.ReadLine();
}
static void fun1(ref int a)
{ 10. a = a * a;
}
static void Main(string[] args)
{ 3. int a = 5;
fun1 (ref a);
Console.WriteLine(a);
Console.ReadLine();
}
static void fun1(ref int a)
{ 10. a = a * a;
}
a)
5
b)
0
c)
20
d)
25
29.
static void Main(string[] args)
{
int X = 0;
if (Convert.ToBoolean(X = 0))
Console.WriteLine("It is zero");
else
Console.WriteLine("It is not zero");
Console.ReadLine();
}
{
int X = 0;
if (Convert.ToBoolean(X = 0))
Console.WriteLine("It is zero");
else
Console.WriteLine("It is not zero");
Console.ReadLine();
}
a)
It is zero
b)
It is not zero
c)
Infinite loop
d)
None of the mentioned
30.
A class member declared protected becomes member of subclass of which type?
a)
public member
b)
private member
c)
protected member
d)
static member
31.
class A {
int i;
void display()
{ System.out.println(i); }
}
class B extends A {
int j;
void display()
{ System.out.println(j); }
}
class inheritance_demo {
public static void main(String args[])
{ B obj = new B();
obj.i=1;
obj.j=2;
obj.display(); }
}
int i;
void display()
{ System.out.println(i); }
}
class B extends A {
int j;
void display()
{ System.out.println(j); }
}
class inheritance_demo {
public static void main(String args[])
{ B obj = new B();
obj.i=1;
obj.j=2;
obj.display(); }
}
a)
0
b)
1
c)
2
d)
compilation error
32.
What is the output of this program?
class multithreaded_programing {
public static void main(String args[]) {
Thread t = Thread.currentThread();
t.setName("New Thread");
System.out.println(t);
}
}
class multithreaded_programing {
public static void main(String args[]) {
Thread t = Thread.currentThread();
t.setName("New Thread");
System.out.println(t);
}
}
a)
Thread[5,main]
b)
Thread[New Thread,5]
c)
Thread[main,5,main]
d)
Thread[New Thread,5,main]
33.
What is the name of the thread in output of this program?
class multithreaded_programing {
public static void main(String args[]) {
Thread t = Thread.currentThread();
System.out.println(t.isAlive());
}
}
class multithreaded_programing {
public static void main(String args[]) {
Thread t = Thread.currentThread();
System.out.println(t.isAlive());
}
}
a)
0
b)
1
c)
true
d)
false
34.
What is the output of this program?
class leftshift_operator {
public static void main(String args[])
{
byte x = 64;
int i;
byte y;
i = x << 2;
y = (byte) (x << 2)
System.out.print(i + " " + y);
}
}
class leftshift_operator {
public static void main(String args[])
{
byte x = 64;
int i;
byte y;
i = x << 2;
y = (byte) (x << 2)
System.out.print(i + " " + y);
}
}
a)
0 64
b)
64 0
c)
0 256
d)
256 0
35.
What is the output of this program?
class Output {
public static void main(String args[])
{
int a = 1; int b = 2; int c = 3;
a |= 4;
b >>= 1;
c <<= 1;
a ^= c;
System.out.println(a + " " + b + " " + c); }
}
class Output {
public static void main(String args[])
{
int a = 1; int b = 2; int c = 3;
a |= 4;
b >>= 1;
c <<= 1;
a ^= c;
System.out.println(a + " " + b + " " + c); }
}
a)
3 1 6
b)
2 2 3
c)
2 3 4
d)
3 3 6
36.
What is the output of this program?
class ternary_operator {
public static void main(String args[])
{
int x = 3;
int y = ~ x;
int z;
z = x > y ? x : y;
System.out.print(z);
}
}
class ternary_operator {
public static void main(String args[])
{
int x = 3;
int y = ~ x;
int z;
z = x > y ? x : y;
System.out.print(z);
}
}
a)
0
b)
1
c)
3
d)
-4
37.
What is the output of this program?
class Output {
public static void main(String args[])
{
int x , y = 1;
x = 10;
if (x != 10 && x / 0 == 0)
System.out.println(y);
else
System.out.println(++y);
}
}
class Output {
public static void main(String args[])
{
int x , y = 1;
x = 10;
if (x != 10 && x / 0 == 0)
System.out.println(y);
else
System.out.println(++y);
}
}
a)
1
b)
2
c)
Runtime error owing to division by zero in if condition.
Unpredictable behavior of program.
Unpredictable behavior of program.
38.
Which option of ls command used to view file inode number
a)
–l
b)
-o
c)
–a
d)
–i
39.
find / -name ‘*’ will
a)
List all files and directories recursively starting from /
b)
List a file named * in /
c)
List all files in / directory
d)
List all files and directories in / directory
40.
The view of total database content is
a)
Conceptual view.
b)
Internal view.
c)
External view.
d)
Physical View.
100 %
