wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SECOND YEARS

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

Which will legally declare, construct, and initialize an array?

a)

int [] myList = {"1", "2", "3"};

b)

int [] myList = (5, 8, 2);

c)

int myList [] [] = {4,9,7,0};

d)

int myList [] = {4, 3, 7};

2.

Which is a reserved word in the Java programming language?

a)

method

b)

native

c)

subclasses

d)

reference

3.

Which one of these lists contains only Java programming language keywords?

a)

class, if, void, long, Int, continue

b)

byte, break, assert, switch, include

c)

try, virtual, throw, final, volatile, transient

d)

goto, instanceof, native, finally, default, throws

4.

Which is the valid declarations within an interface definition?

a)

public double methoda();

b)

public final double methoda();

c)

static void methoda(double d1);

d)

protected void methoda(double d1);

5.

What is the numerical range of a char?

a)

-128 to 127

b)

-(215) to (215) - 1

c)

0 to 32767

d)

0 to 65535

6.

Which cannot directly cause a thread to stop executing?

a)

Calling the SetPriority() method on a Thread object.

b)

Calling the wait() method on an object.

c)

Calling notify() method on an object

d)

Calling read() method on an InputStream object.

7.

Which of the following will directly stop the execution of a Thread?

a)

wait()

b)

notify()

c)

notifyall()

d)

exits synchronized code

8.

Which will contain the body of the thread?

a)

run();

b)

start();

c)

stop();

d)

main();

9.

What allows the programmer to destroy an object x?

a)

x.delete()

b)

x.finalize()

c)

Runtime.getRuntime().gc()

d)

Only the garbage collection system can destroy an object.

10.

You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

a)

public

b)

private

c)

protected

d)

transient

11.

Which of the following is the property of transaction that protects data from system failure?

a)

Atomicity

b)

Isolation

c)

Durability

d)

Consistency

12.

Which normalization form is based on the transitive dependency?

a)

1NF

b)

2NF

c)

3NF

d)

BCNF

13.

Which is the lowest level of abstraction that describes how the data are actually stored?

a)

Physical

b)

Abstract

c)

View

d)

User

14.

What is rows of a relation known as?

a)

Degree

b)

Entity

c)

Tuple

d)

None

15.

Which of the following is a commands of DDL?

a)

Alter

b)

Delete

c)

Create

d)

All of the above

16.

Which of the following SQL command is used for removing (or deleting) a relation form the database?

a)

Drop

b)

Delete

c)

Rollback

d)

Remove

17.

Which of the following allows to uniquely identify a tuple?

a)

Schema

b)

Attribute

c)

Super key

d)

Domain

18.

How many levels are there in architecture of database?

a)

2

b)

3

c)

4

d)

5

19.

Which normal form deals with multivalued dependency?

a)

1NF

b)

2NF

c)

3NF

d)

4NF

20.

What is the name of the query that is placed within a WHERE or HAVING clause of another query?

a)

Multiquery

b)

Subquery

c)

Superquery

d)

Masterquery

21.

What is the main function of the command interpreter?

a)

to provide the interface between the API and application program

b)

to handle the files in the operating system

c)

to get and execute the next user-specified command

d)

none of the mentioned

22.

To access the services of the operating system, the interface is provided by the ___________

a)

Library

b)

System calls

c)

Assembly instructions

d)

API

23.

CPU scheduling is the basis of ___________

a)

multiprogramming operating systems

b)

larger memory sized systems

c)

multiprocessor systems

d)

none of the mentioned

24.

Which one of the following is not a real time operating system?

a)

RTLinux

b)

Palm OS

c)

QNX

d)

VxWorks

25.

In a timeshare operating system, when the time slot assigned to a process is completed, the process switches from the current state to?

a)

Suspended state

b)

Terminated state

c)

Ready state

d)

Blocked state

26.

The FCFS algorithm is particularly troublesome for ___________

a)

operating systems

b)

multiprocessor systems

c)

time sharing systems

d)

multiprogramming systems

27.

A process refers to 5 pages, A, B, C, D, E in the order : A, B, C, D, A, B, E, A, B, C, D, E. If the page replacement algorithm is FIFO, the number of page transfers with an empty internal store of 3 frames is?

a)

8

b)

10

c)

9

d)

7

28.

If no frames are free, _____ page transfer(s) is/are required.

a)

one

b)

two

c)

three

d)

four

29.

For 3 page frames, the following is the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 How many page faults does the LRU page replacement algorithm produce?

a)

10

b)

15

c)

11

d)

12

30.

In Unix, which system call creates the new process?

a)

create

b)

fork

c)

new

d)

none of the mentioned

31.

What is the port number of PoP?

a)

35

b)

43

c)

110

d)

25

32.

What is the number of layers in the OSI model?

a)

2 layers

b)

4 layers

c)

7 layers

d)

9 layers

33.

Identify the layer which provides service to the user.

a)

Session layer

b)

Application layer

c)

Presentation layer

d)

Physical layer

34.

Identify the total versions of IP.

a)

1

b)

2

c)

34

35.

Choose among the following, which is the most common internet protocol.

a)

PPP

b)

FTP

c)

TCP/IP

d)

SMTP

36.

What is the length of the IPv4 address?

a)

8 bits

b)

16 bits

c)

32 bits

d)

128 bits

37.

What does port number 143 refer to?

a)

CAP

b)

FTP

c)

IMAP

d)

POP

38.

Identify the device used to boost up a weak signal.

a)

Modem

b)

Repeater

c)

Switch

d)

Router

39.

What is the length of the MAC address?

a)

8 bits

b)

16 bits

c)

32 bits

d)

48 bits

40.

What of the following device is used in the network layer?

a)

Application gateway

b)

Switch

c)

Router

d)

Repeaters