Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Basics

Total questions: 25

Worksheet time: 14mins

Name
Class
Date
1.

Predict the output:
int main()
{
int a=5;
printf("%d", a-- + --a);
return 0; }

a)

8

b)

7

c)

9

d)

10

2.

What is a computer network and its importance?

a)

A computer network is a group of unrelated computers that do not communicate with each other and do not share resources. Its importance lies in causing communication barriers and resource hoarding.

b)

A computer network is a group of computers that only communicate through physical mail. Its importance lies in slowing down communication and resource sharing.

c)

A computer network is a group of interconnected computers that communicate with each other and share resources. Its importance lies in facilitating communication, sharing resources, and providing access to information and services.

d)

A computer network is a type of food delivery service for computers. Its importance lies in providing snacks and refreshments to the computers.

3.

What will be the output of the snippet ?
int main() {
int a=5;
printf("%d", a++ + ++a);
return 0;
}

a)

10

b)

13

c)

11

d)

12

4.

Which of the following statements are TRUE about an SQL query? P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause R : All attributes used in the GROUP BY clause must appear in the SELECT clause S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause

a)

P and R

b)

P and S

c)

Q and R

d)

Q and S

5.

For the relation R(ABCDEFGH) with FD's= {CH->G, A->BC, B->CHF, E->A, F->EG such that F+ is exactly the set of FDs that hold for R.} Consider the FDs given in above question. The relation R is

a)

in 2NF, but not in 3NF

b)

in 3NF, but not in BCNF

c)

in 1NF, but not in 2NF

d)

in BCNF

6.

Consider the relation scheme R = {E, F, G, H, I, J, K, L, M, N} and the set of functional dependencies {{E, F} -> {G}, {F} -> {I, J}, {E, H} -> {K, L}, K -> {M}, L -> {N} on R. What is the key for R?

a)

{E,F}

b)

{E,F,H}

c)

{E,F,H,K,L}

d)

{E}

7.

Consider the following statements about process state transitions for a system using preemptive scheduling. 

I. A running process can move to a ready state
II. A ready process can move to a ready state
III. A blocked process can move to a running state
IV. A blocked process can move to a ready state

Which of the above statements is TRUE?

a)

I, II, and IV only

b)

I, II, and III only

c)

II and III only

d)

I, II, III, and IV

8.

What is the difference between system software and application software?

a)

System software is only compatible with Windows operating system, while application software is compatible with all operating systems.

b)

System software is used for entertainment purposes, while application software is used for work purposes.

c)

System software operates the computer hardware and provides a platform for running application software, while application software performs specific tasks for the user.

d)

System software is free to use, while application software requires a paid license.

9.

Explain the concept of a network protocol.

a)

A programming language used for networking

b)

A set of rules and conventions that govern the communication and data exchange between devices on a network.

c)

A type of computer hardware

d)

A type of computer virus

10.

A process executes the code 

fork ( );
fork ( );
fork ( );

The total number of child processes created is

a)

3

b)

4

c)

7

d)

8

11.

In which one of the following page replacement policies, Belady’s anomaly may occur?

a)

Optimal

b)

  FIFO

c)

LRU

d)

MRU

12.

In terms of databases, what is meant by concurrency?

a)

Many users can interact with the database simultaneously

b)

More than one user cannot edit data at the same time

c)

Only a single user can interact with the database at a time

13.

The decimal value 0.5 in IEEE single precision floating point representation has

a)

no exact representation

b)

fraction bits of 00000…..000000 and exponent value of -1

c)

fraction bits of 10000…..000000 and exponent value of 0

d)

fraction bits of 00000…..000000 and exponent value of 0

14.

The amount of ROM needed to implement a 4-bit multiplier is

a)

64 bits

b)

128 bits

c)

1 K Bits

d)

2 K Bits

15.

___ exists when different versions of the same data appear in different places

a)

Data integrity

b)

Data anomaly

c)

Data redundancy

d)

Data inconsistency

16.

In 2′s complement addition, the overflow

a)

cannot occur when a positive value is added to a negative value

b)

is flagged whenever there is carry from sign bit addition

c)

is flagged when the carries from the sign bit and the previous bit match

d)

none of the given

17.

The register which holds the address of the location to or from which data are to be transferred is called

a)

Index Register

b)

Instruction Register

c)

Memory Address Register

d)

Memory Data Register

18.

The protocol data unit(PDU) for the application layer in the Internet stack is

a)

Frame 

b)

Datagram

c)

Segment

d)

Message 

19.

Four memory chips of 16 x 4 size have their address bases connected together. The system will be of size

a)

64 X 64

b)

16 X 16

c)

32 X 16

d)

256 X 1

20.

In the IPv4 addressing format, the number of networks allowed under Class C addresses is

a)

2^21

b)

2^14 

c)

2^7

d)

2^24 

21.

An Internet Service Provider(ISP) has the following chunk of CIDR-based IP addresses available with it:245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?

a)

245.248.128.0/21 and 245.248.128.0/22 

b)

245.248.136.0/21 and 245.248.128.0/22 

c)

245.248.132.0/22 and 245.248.132.0/21 

d)

245.248.136.0/22 and 245.248.132.0/21 

22.

The result evaluating the postfix expression 10 5 + 60 6/ * 8 – is

a)

213

b)

284

c)

142

d)

71

23.

The grouping of jobs that require similar resources

a)

timesharing

b)

serial processing

c)

multiprogramming

d)

batch processing

24.

Preemption means

a)

process can be paused by system

b)

process cannot be halted once execution begins

c)

process has high priority

d)

process is short

25.

A switch is a device

a)

that connects all the devices in the network.

b)

that manages all the softwares in the network.

c)

that manages all the devices in the network.