All Subjects
Barani Institute of Information Technology54 Questions

Computer Science & Information Technology MCQs

Practice Computer Science & Information Technology multiple-choice questions for Barani Institute of Information Technology competitive exams. Each question includes the correct answer and a short explanation, and past-paper questions are marked so you can revise both repeated and fresh material in one place.

7
10
11
12
ExplanationThe dot product is calculated as (1*3) + (2*4) = 3 + 8 = 11.
func
define
def
function
ExplanationIn Python, the 'def' keyword is the standard way to declare a function.
Immediate
Direct
Register Indirect
Indexed
ExplanationIn register indirect addressing, the register contains the memory address of the operand rather than the operand itself.
2x2
3x4
4x3
3x2
ExplanationWhen multiplying an (m x n) matrix by an (n x p) matrix, the resulting matrix is (m x p). Here, (3 x 2) * (2 x 4) results in a 3 x 4 matrix.
x^2 + 2
3x^2 + 2x
3x^2 + 2
3x^3 + 2
ExplanationUsing the power rule, the derivative of x^n is nx^(n-1). For x^3 it is 3x^2, and for 2x it is 2.
[5, 6]
[6, 8]
[3, 8]
[6, 4]
ExplanationScaling a vector by a scalar constant involves multiplying each component of the vector by that constant (3*2=6, 4*2=8).
P(A|B) = P(A) + P(B)
P(A ∩ B) = P(A) * P(B)
P(A ∪ B) = P(A) * P(B)
P(A ∩ B) = P(A) + P(B)
ExplanationFor independent events, the probability of both occurring is the product of their individual probabilities.
Identity matrix
Diagonal matrix
Symmetric matrix
Orthogonal matrix
ExplanationA symmetric matrix is equal to its transpose, meaning it is symmetric across its main diagonal.
0
1
e
undefined
ExplanationAny non-zero real number raised to the power of 0 equals 1.
ReLU
Sigmoid
Tanh
Linear
ExplanationThe Sigmoid function maps any input to a value between 0 and 1, making it useful for probability-based outputs.
[8, 3]
[5, 3]
[8, 4]
[2, 6]
ExplanationThe gradient is [df/dx, df/dy] = [2x + 3y, 3x]. At (1, 2), this is [2(1) + 3(2), 3(1)] = [8, 3].
3
4
5
7
ExplanationDistance = sqrt((3-0)^2 + (4-0)^2) = sqrt(9+16) = sqrt(25) = 5.
0
1
2
-1
ExplanationThe identity matrix I = [[1, 0], [0, 1]]. The determinant is (1*1) - (0*0) = 1.
f''(x) > 0
f''(x) < 0
f''(x) = 0
f''(x) is undefined
ExplanationA function that is strictly concave has a negative second derivative throughout its domain.
The sum of the diagonal elements
The product of the diagonal elements
The elements on the main diagonal
The square root of the diagonal elements
ExplanationFor any diagonal matrix, the eigenvalues are simply the entries present on the main diagonal.
e
0
1
Infinity
ExplanationBy definition, ln(x) = 0 when x = 1, since e^0 = 1.
Queue
Stack
Linked List
Binary Tree
ExplanationA stack is a linear data structure that follows the LIFO principle, where the last element added is the first one removed.
O(1)
O(n)
O(log n)
O(n log n)
ExplanationIn a balanced BST, each step of the search eliminates half of the remaining nodes, leading to logarithmic time complexity.
RAM
ALU
Control Unit
Registers
ExplanationThe Arithmetic Logic Unit (ALU) is the part of the CPU specifically designed to perform arithmetic and logical calculations.
It is permanent storage
It requires power to maintain stored information
It is slower than hard drives
It is read-only
ExplanationVolatile memory, such as RAM, loses all stored data once the power supply is removed.
To provide a graphical user interface
To manage hardware resources and system processes
To compile source code
To perform web browsing
ExplanationThe kernel is the core of an OS that manages CPU, memory, and devices.
O(n)
O(n^2)
O(log n)
O(2^n)
ExplanationExponential growth, where execution time doubles for each input, is represented as O(2^n).
Assigning IP addresses to devices
Translating domain names into IP addresses
Encrypting network traffic
Filtering malicious website requests
ExplanationDNS (Domain Name System) functions like a phonebook, resolving human-readable URLs into machine-readable IP addresses.
Queue
Linked List
Graph
Stack
ExplanationA graph is a non-linear data structure because elements are connected via edges, forming multiple paths.
To hold the current instruction being executed
To hold the address of the next instruction to be fetched
To count the number of threads running
To store results of calculations
ExplanationThe Program Counter (PC) keeps track of the memory address of the next instruction in the sequence.
Modularity
Scalability
Abstraction
Encapsulation
ExplanationScalability is the characteristic of a system to handle growing amounts of work by adding resources.
Control Unit
Arithmetic Logic Unit
Memory Unit
Input/Output Unit
ExplanationThe memory unit stores both instructions and data in the Von Neumann architecture.
To pause a program for user input
To signal the CPU that an external device needs attention
To increase the clock speed of the processor
To clear the cache memory
ExplanationAn IRQ is a hardware signal sent to the processor that temporarily stops the current process to service a device.
Sorting large datasets
Probabilistic membership testing
Compressing text files
Encrypting network packets
ExplanationA Bloom filter is a space-efficient data structure used to test whether an element is a member of a set.
14
11
7
9
ExplanationAccording to operator precedence, multiplication is performed before addition. So, 4 * 2 = 8, and 3 + 8 = 11.
To speed up the function execution
To terminate the recursive calls and prevent an infinite loop
To allocate memory for variables
To call the function itself
ExplanationA base case provides the condition under which recursion stops, preventing infinite recursion.
Procedural
Functional
Object-Oriented
Declarative
ExplanationObject-Oriented Programming (OOP) is centered around objects which bundle data fields and methods together.
break
continue
pass
exit
ExplanationThe 'continue' statement terminates the current iteration of the loop and proceeds to the next iteration.
True
False
None
Error
Explanation(False) OR (True) evaluates to True.
Executes code line by line
Converts source code into machine code in one go
Manages the database connections
Debugs the code automatically
ExplanationA compiler translates the entire source code into a standalone executable machine code file.
Tuple
String
Integer
List
ExplanationLists can be changed (mutated) after they are created, whereas tuples and strings are immutable.
To test the speed of the code
To handle exceptions or runtime errors
To force a loop to run forever
To define a variable scope
ExplanationTry-except blocks allow a program to catch errors and execute fallback code rather than crashing.
A process where a function calls itself
A type of loop that runs infinitely
A method to optimize memory
A way to sort arrays
ExplanationRecursion is a programming technique where a function calls itself to solve smaller instances of the same problem.
1110
1000
0110
1111
Explanation1010 AND 1100 compares each bit; only where both are 1 does the result yield 1, resulting in 1000.
O(n)
O(n log n)
O(n^2)
O(log n)
ExplanationQuicksort performs in O(n log n) time in its best and average cases due to the divide-and-conquer splitting.
Polymorphism
Inheritance
Abstraction
Encapsulation
ExplanationInheritance is the mechanism where a new class derives properties and behaviors from an existing base class.
The loop executes once
The loop throws an error
The loop body never executes
The program terminates
ExplanationA 'while' loop checks the condition before executing the body; if it is false, it skips the code block entirely.
To increase internet speed for end-users
To distribute incoming network traffic across multiple servers
To store backups of user data
To encrypt network traffic
ExplanationLoad balancers ensure high availability and reliability by spreading incoming traffic across a pool of backend servers.
HTTP
FTP
HTTPS
SMTP
ExplanationHTTPS (HyperText Transfer Protocol Secure) uses TLS/SSL to encrypt data transmitted between a web browser and a server.
Hypertext Transfer Protocol Security
Hyperlink Transfer Protocol Secure
Hypertext Transfer Protocol Secure
Hypertext Transmission Protocol Secure
ExplanationHTTPS adds a layer of encryption (SSL/TLS) to the standard HTTP protocol for secure communication.
A column with non-unique values
A column that uniquely identifies a row in a table
A tool used to query the database
A backup copy of the data
ExplanationA primary key is a field that must contain unique values and cannot be NULL, used to identify each record.
To speed up internet connection
To monitor and control incoming and outgoing network traffic
To encrypt all hard drive data
To back up files to the cloud
ExplanationA firewall acts as a security barrier between a trusted internal network and untrusted external networks.
IaaS
On-premise
Physical Storage
Local Server
ExplanationInfrastructure as a Service (IaaS) provides virtualized computing resources like servers and networking via the cloud.
A technique to speed up CPU performance
A type of cyberattack using deceptive emails to steal information
A method to fix software bugs
A way to organize file directories
ExplanationPhishing involves sending fraudulent communications that appear to come from a reputable source.
Star
Mesh
Bus
Ring
ExplanationIn a bus topology, all network nodes are connected to a single central cable, often called the backbone.
Standard Query Language
Structured Query Language
System Query Language
Sequential Query Language
ExplanationSQL is the standard language used for managing and manipulating relational databases.
An Application Programming Interface that allows software programs to interact
A type of virus that attacks servers
A hardware component for graphics
A method to format hard drives
ExplanationAn API is a set of rules and protocols that allows different software applications to communicate with each other.
Encrypts outgoing data packets
Distinguishes between the network address and host address
Translates domain names to IP addresses
Assigns dynamic IP addresses to devices
ExplanationA subnet mask determines which part of an IP address refers to the network and which part refers to the host.
Data Link Layer
Transport Layer
Network Layer
Session Layer
ExplanationThe Network Layer (Layer 3) handles the routing of data packets across different networks using logical addressing.

Frequently Asked Questions

Are these Computer Science & Information Technology MCQs free?

Yes. Every Computer Science & Information Technology MCQ on this page is free to practice, including the correct answer and explanation.

Do these include past-paper questions?

Yes — questions sourced from past papers are clearly marked with a "Past Paper" badge, alongside fresh practice questions.

Which exams do these Computer Science & Information Technology MCQs help with?

They are aimed at Barani Institute of Information Technology and related Pakistani competitive exams that test Computer Science & Information Technology.

How should I practice subject-wise MCQs?

Attempt each question first, then reveal the answer and read the explanation. Short, focused sessions on one subject work better than long unstructured reading.

We use cookies

We use essential cookies to keep the platform running and analytics cookies to understand usage. You can accept or reject analytics and advertising cookies.