WorksheetsComputer Science Basics
Total questions: 25
Worksheet time: 14mins
Predict the output:
int main()
{
int a=5;
printf("%d", a-- + --a);
return 0; }
8
7
9
10
What is a computer network and its importance?
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.
A computer network is a group of computers that only communicate through physical mail. Its importance lies in slowing down communication and resource sharing.
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.
A computer network is a type of food delivery service for computers. Its importance lies in providing snacks and refreshments to the computers.
What will be the output of the snippet ?
int main() {
int a=5;
printf("%d", a++ + ++a);
return 0;
}
10
13
11
12
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
P and R
P and S
Q and R
Q and S
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
in 2NF, but not in 3NF
in 3NF, but not in BCNF
in 1NF, but not in 2NF
in BCNF
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?
{E,F}
{E,F,H}
{E,F,H,K,L}
{E}
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?
I, II, and IV only
I, II, and III only
II and III only
I, II, III, and IV
What is the difference between system software and application software?
System software is only compatible with Windows operating system, while application software is compatible with all operating systems.
System software is used for entertainment purposes, while application software is used for work purposes.
System software operates the computer hardware and provides a platform for running application software, while application software performs specific tasks for the user.
System software is free to use, while application software requires a paid license.
Explain the concept of a network protocol.
A programming language used for networking
A set of rules and conventions that govern the communication and data exchange between devices on a network.
A type of computer hardware
A type of computer virus
A process executes the code
fork ( );
fork ( );
fork ( );
The total number of child processes created is
3
4
7
8
In which one of the following page replacement policies, Belady’s anomaly may occur?
Optimal
FIFO
LRU
MRU
In terms of databases, what is meant by concurrency?
Many users can interact with the database simultaneously
More than one user cannot edit data at the same time
Only a single user can interact with the database at a time
The decimal value 0.5 in IEEE single precision floating point representation has
no exact representation
fraction bits of 00000…..000000 and exponent value of -1
fraction bits of 10000…..000000 and exponent value of 0
fraction bits of 00000…..000000 and exponent value of 0
The amount of ROM needed to implement a 4-bit multiplier is
64 bits
128 bits
1 K Bits
2 K Bits
___ exists when different versions of the same data appear in different places
Data integrity
Data anomaly
Data redundancy
Data inconsistency
In 2′s complement addition, the overflow
cannot occur when a positive value is added to a negative value
is flagged whenever there is carry from sign bit addition
is flagged when the carries from the sign bit and the previous bit match
none of the given
The register which holds the address of the location to or from which data are to be transferred is called
Index Register
Instruction Register
Memory Address Register
Memory Data Register
The protocol data unit(PDU) for the application layer in the Internet stack is
Frame
Datagram
Segment
Message
Four memory chips of 16 x 4 size have their address bases connected together. The system will be of size
64 X 64
16 X 16
32 X 16
256 X 1
In the IPv4 addressing format, the number of networks allowed under Class C addresses is
2^21
2^14
2^7
2^24
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?
245.248.128.0/21 and 245.248.128.0/22
245.248.136.0/21 and 245.248.128.0/22
245.248.132.0/22 and 245.248.132.0/21
245.248.136.0/22 and 245.248.132.0/21
The result evaluating the postfix expression 10 5 + 60 6/ * 8 – is
213
284
142
71
The grouping of jobs that require similar resources
timesharing
serial processing
multiprogramming
batch processing
Preemption means
process can be paused by system
process cannot be halted once execution begins
process has high priority
process is short
A switch is a device
that connects all the devices in the network.
that manages all the softwares in the network.
that manages all the devices in the network.
