Zollege is here for to help you!!
Need Counselling
Bihar Board logo

Bihar Board Class 12 Computer Science 2025 Question Paper with Solutions Set B

Nidhi Bamnawat's profile photo

Nidhi Bamnawat

| Updated On - Sep 24, 2025

Bihar Board Class 12 Computer Science Question Paper PDF with Solutions is available for download. The Bihar School Examination Board (BSEB) conducted the Class 12 examination for a total duration of 3 hours 15 minutes, and the question paper was of a total of 100 marks.

Bihar Board Class 12 Computer Science 2025 Question Paper with Solutions Set B

Bihar Board Class 12 Computer Science 2025 Question Paper Set B Download PDF Check Solutions

Question 1:

Boolean algebra is basically based on

  • (A) Truth
  • (B) Logic
  • (C) Symbol
  • (D) Numbers
Correct Answer: / Logic
View Solution

Step 1: Analyze the definition of Boolean Algebra.
Boolean algebra is a branch of algebra in which the values of the variables are the truth values \textit{true and \textit{false, usually denoted 1 and 0 respectively.

Step 2: Evaluate the options.

(A) Truth: While it deals with truth values, this is a component of the broader concept.
(B) Logic: Boolean algebra is the mathematical foundation of digital logic and computer science. It operates on logical statements.
(C) Symbol: It uses symbols, but this is true of all algebra, not its fundamental basis.
(D) Numbers: It uses the numbers 1 and 0, but they represent logical states (true/false), not numerical quantities in the traditional sense.

Therefore, Boolean algebra is fundamentally based on logic. Quick Tip: Remember that Boolean algebra is the mathematics of logic. Its primary operators (AND, OR, NOT) are logical operators that correspond to conjunction, disjunction, and negation in formal logic.


Question 2:

The output of OR gate is 1 when

  • (A) If both inputs are zero \
  • (B) If either or both inputs are 1 \
  • (C) Only if both inputs are 1 \
  • (D) If either input is zero
Correct Answer: (B) If either or both inputs are 1
View Solution

Step 1: Recall the truth table for a 2-input OR gate.
The output of an OR gate is true (1) if at least one of its inputs is true (1).


\begin{tabular{|c|c|c|
\hline
Input A & Input B & Output (A OR B)

\hline
0 & 0 & 0

0 & 1 & 1

1 & 0 & 1

1 & 1 & 1

\hline
\end{tabular


Step 2: Analyze the options based on the truth table.

(A) The output is 0 when both inputs are 0. Incorrect.
(B) The output is 1 in the last three rows of the table, which covers cases where either A is 1, B is 1, or both are 1. Correct.
(C) This describes an AND gate. Incorrect.
(D) If one input is 0 and the other is also 0, the output is 0. Incorrect.

The condition that makes the output of an OR gate 1 is when any of its inputs are 1. Quick Tip: A simple way to remember the function of an OR gate is to think of it as "one or the other or both". As long as there's at least one '1' at the input, the output will be '1'.


Question 3:

Which of the following is a functionally complete set of gates ?

(i) NAND \quad (ii) NOT

  • (A) I but not II
  • (B) II but not I
  • (C) Both I and II
  • (D) None of these
Correct Answer: (A) I but not II
View Solution

Step 1: Define a functionally complete set of gates.
A set of logic gates is functionally complete if any possible Boolean function can be realized using only the gates in that set. NAND and NOR gates are known as universal gates because they are functionally complete by themselves.

Step 2: Evaluate the given gates.

(i) NAND: The NAND gate is a universal gate. It can be used to create NOT, AND, and OR functions. Therefore, it is a functionally complete set.
(ii) NOT: The NOT gate only performs inversion. It cannot create AND or OR logic. Therefore, it is not functionally complete.

Since NAND (I) is functionally complete and NOT (II) is not, the correct option is "I but not II". Quick Tip: Remember that both NAND and NOR gates are "universal gates". This is a key concept in digital logic, meaning either one can be used to build any other type of logic gate.


Question 4:

Which of the following will not return a value ?

  • (A) Null
  • (B) Void
  • (C) Empty
  • (D) Free
Correct Answer: (B) Void
View Solution

Step 1: Understand the context of the question.
In programming languages like C, C++, Java, and C\#, functions or methods have a return type that specifies the type of value they send back after execution.

Step 2: Analyze the options.

(A) Null: This is a special value that represents the absence of a value or a reference to no object. A function \textit{can return null.
(B) Void: This is a keyword used as a return type for functions that do not return any value. It explicitly means "returns nothing".
(C) Empty: This describes the state of a data structure (like an empty string "" or an empty list). It is not a type or a keyword that signifies no return value.
(D) Free: This is typically a function name (e.g., free()) used in memory management to deallocate memory. It is an action, not a return type.

Therefore, \text{Void is the keyword used to indicate that a function will not return a value. Quick Tip: In programming, distinguish between a function that returns "no value" (void) and a function that returns a "value of nothing" (null). \text{void means there's no return mechanism, while null is an actual value that can be returned.


Question 5:

Terabyte (TB) is the unit of measurement for

  • (A) Light wave
  • (B) Speed of aircraft
  • (C) Computer memory
  • (D) Bandwidth
Correct Answer: (C) Computer memory
View Solution

Step 1: Define Terabyte (TB).
A terabyte is a unit of digital information storage. Conventionally, 1 Terabyte = 1000 Gigabytes or, in binary terms, \(2^{40}\) bytes (1024 Gigabytes).

Step 2: Evaluate the options.

(A) Light wave: Measured by wavelength (e.g., nanometers) or frequency (e.g., Hertz).
(B) Speed of aircraft: Measured in units of distance per time (e.g., kilometers per hour, knots).
(C) Computer memory: This includes RAM and storage devices like hard drives (HDDs) and solid-state drives (SSDs), which are measured in Bytes, Kilobytes (KB), Megabytes (MB), Gigabytes (GB), and Terabytes (TB).
(D) Bandwidth: Data transfer rate is measured in bits per second (bps) or Bytes per second (Bps) and their multiples (e.g., Mbps, Gbps).

Thus, a Terabyte is a unit for measuring computer memory and data storage capacity. Quick Tip: Keep the data units in order: Bit (smallest), Byte (8 bits), Kilobyte (KB), Megabyte (MB), Gigabyte (GB), Terabyte (TB), Petabyte (PB). Each is roughly 1000 times larger than the previous one.


Question 6:

How are the constant declared ?

  • (A) Const keyword
  • (B) \#define preprocessor
  • (C) Both (A) and (B)
  • (D) S define
Correct Answer: (C) Both (A) and (B)
View Solution

Step 1: Understand what a constant is in programming.
A constant is a value that cannot be altered by the program during its execution.

Step 2: Analyze the declaration methods in languages like C and C++.

(A) const keyword: This is the modern, preferred way. It creates a typed, read-only variable. For example: \text{const float PI = 3.14159;
(B) \text{\#define preprocessor: This directive is used to define macros. Before compilation, the preprocessor replaces every occurrence of the macro with its value. For example: \text{\#define PI 3.14159. While it achieves a similar result, it's a simple text substitution without type checking.

Since both \text{const and \text{\#define are valid methods for creating constants in languages like C/C++, the correct option is (C). Quick Tip: Prefer using the \text{const keyword over \#define for declaring constants. const variables are type-checked by the compiler and respect scope, which can prevent subtle bugs that \#define might cause.


Question 7:

Which one of the following is used with cout as an operator ?

  • (A) \( \ll \)
  • (B) \( \gg \)
  • (C) \(>\)
  • (D) \(<\)
Correct Answer: (A) \text{\( \ll \)}
View Solution

Step 1: Identify cout in C++.
\text{cout is the standard output stream object in C++. It is used to print output to the console.

Step 2: Identify the operator used with \text{cout.
The stream insertion operator, \text{<<, is used to "insert" data into the output stream. For example: \text{std::cout << "Hello, World!";

Step 3: Analyze the other options.

(B) \text{>>: This is the stream extraction operator, used with \text{cin to get input from the user.
(C) \text{>: This is the greater-than comparison operator.
(D) \text{<: This is the less-than comparison operator.

Therefore, \text{<< is the operator used with \text{cout. Quick Tip: A simple mnemonic for C++ streams: \text{cout << "points" the data outwards to the console. cin >> "points" the data inwards from the keyboard to a variable.


Question 8:

If all devices are connected to a central hub then this topology is called

  • (A) Bus topology
  • (B) Ring topology
  • (C) Star topology
  • (D) Tree topology
Correct Answer: (C) Star topology
View Solution

Step 1: Define the characteristics of the described topology.
The key feature is that all devices (nodes) connect to a single, central point (a hub or a switch).

Step 2: Compare this with the given options.

(A) Bus topology: All devices connect to a single main cable (the bus).
(B) Ring topology: Each device is connected to exactly two other devices, forming a circular pathway for signals.
(C) Star topology: All devices are connected to a central hub. This matches the description perfectly.
(D) Tree topology: A hybrid topology that combines bus and star topologies. It has a root node, and all other nodes are linked to form a hierarchy.

The topology where all devices connect to a central hub is the star topology. Quick Tip: Visualize the network layout. A central point with lines radiating out to each device looks like a star, which makes the name easy to remember.


Question 9:

Which of the following is most suitable for a menu-driven program ?

  • (A) For
  • (B) While
  • (C) Do-While
  • (D) All of these
Correct Answer: (C) Do-While
View Solution

Step 1: Understand the requirement of a menu-driven program.
A menu-driven program must first display the menu options to the user and then wait for an input. This action of displaying the menu must happen at least once.

Step 2: Analyze the suitability of the loop structures.

(A) for loop: Best for iterating a known number of times. Not ideal for a menu that runs until the user chooses to exit.
(B) \text{while loop: This is a pre-test loop. It checks the condition \textit{before executing the loop body. While it can be used, it's slightly less natural than a do-while loop for this task.
(C) \text{do-while loop: This is a post-test loop. It executes the loop body \text{at least once and then checks the condition. This is perfect for a menu, as the menu is displayed first, and then the loop continues based on the user's choice.

Because the menu must be displayed at least once, the \text{do-while loop is the most suitable structure. Quick Tip: Use a \text{do-while loop whenever you need an action to be performed at least one time. Think "do this, then check the condition". This is a classic pattern for user menus.


Question 10:

Which of the following example expresses the commutative law of multiplication ?

  • (A) \(A + B = B + A\)
  • (B) \(AB = B + A\)
  • (C) \(AB = BA\)
  • (D) \(AB = A \times B\)
Correct Answer: (C) AB = BA
View Solution

Step 1: Define the commutative law of multiplication.
The commutative law states that when two numbers are multiplied, their order can be changed without affecting the product. In algebraic terms, \(a \times b = b \times a\).

Step 2: Analyze the given options.

(A) A + B = B + A: This expresses the commutative law of \textit{addition.
(B) AB = B + A: This is not a standard mathematical law.
(C) AB = BA: This perfectly represents the commutative law of multiplication, where the order of factors A and B is swapped.
(D) AB = A * B: This just shows two different notations for multiplication; it doesn't illustrate a law.

Thus, AB = BA is the correct expression of the commutative law of multiplication. Quick Tip: The word "commutative" is related to "commute," which means to travel or move around. The commutative law means the numbers can move or swap positions without changing the result.


Question 11:

Which of the following example expresses the commutative law of multiplication ?

  • (A) \(A + B = B + A\)
  • (B) \(AB = B + A\)
  • (C) \(AB = BA\)
  • (D) \(AB = A \times B\)
Correct Answer: (C) AB = BA
View Solution

Step 1: Define the commutative law of multiplication.
The commutative law states that when two numbers are multiplied, their order can be changed without affecting the product. In algebraic terms, \(a \times b = b \times a\).

Step 2: Analyze the given options.

(A) A + B = B + A: This expresses the commutative law of \textit{addition.
(B) AB = B + A: This is not a standard mathematical law.
(C) AB = BA: This perfectly represents the commutative law of multiplication, where the order of factors A and B is swapped.
(D) AB = A * B: This just shows two different notations for multiplication; it doesn't illustrate a law.

Thus, AB = BA is the correct expression of the commutative law of multiplication. Quick Tip: The word "commutative" is related to "commute," which means to travel or move around. The commutative law means the numbers can move or swap positions without changing the result.


Question 12:

Simplify: \( y = AB' + (A' + B)C \)

  • (A) \( AB' + C \)
  • (B) \( AB + AC \)
  • (C) \( A'B + AC' \)
  • (D) \( AB + A \)
Correct Answer: (A) \( AB' + C \) (This seems to be a simplification error in the provided options, the correct simplification leads to \( AB' + A'C + BC \). Let's re-evaluate based on possible question intent or typo. Assuming the intended simplified answer is among the choices.) Let's proceed by expansion: \( y = AB' + A'C + BC \). None of the options match this. There might be a typo in the question or options. However, let's analyze a common simplification theorem: \( X + X'Y = X + Y \). Here, if we let \( X = C \), the expression is not in this form. Let's try consensus theorem: \( XY + X'Z + YZ = XY + X'Z \). Here \( X=A, Y=B', Z=C \), the term \( B'C \) is missing. Let's assume the question meant to simplify \( AB' + A'C + B'C \). By consensus theorem this is \( AB' + A'C \). This is not an option. Let's stick to the expanded form \( y = AB' + A'C + BC \). Let's assume there is a mistake in the provided options and one of them is supposed to be correct. Let's check option A: \( AB' + C = AB' + C(A+A') = AB' + AC + A'C \). This does not match. Let's assume the question was \( y = AB' + A'C + C \). Then \( y = AB' + C(A' + 1) = AB' + C \). This matches option A. Let's assume this was the intended question.
View Solution

Step 1: Apply the distributive law to the expression. \[ y = AB' + (A' + B)C \] \[ y = AB' + A'C + BC \]

Step 2: Apply the Consensus Theorem.
The consensus theorem states \( XY + X'Z + YZ = XY + X'Z \). Here, \( X = A, Y = B, Z = C \). Wait, let me re-check variables. \( X=A, Y=B' \). Then we need \( A'C \) and \( B'C \). The expression is \( AB' + A'C + BC \). Let's use \( X=B, Y=C, Z=A' \). Then \( BC + B'Z + YZ \). Doesn't fit.
The expression \( AB' + A'C + BC \) is the simplified form.
Given the options, there is likely a typo in the question. A common simplification is \( X + X'Y = X + Y \). Let's see if we can manipulate it. \( y = AB' + A'C + BC \) \( y = AB' + A'C + BC(A+A') \) \( y = AB' + A'C + ABC + A'BC \) \( y = AB'(1+C) + A'C(1+B) \) \( y = AB' + A'C \)
This simplification from \( AB' + A'C + BC \) to \( AB' + A'C \) using consensus theorem. This is still not among the options.

There must be a typo in the question. Let's assume the question was \( y = AB' + C \). This is already simplified. Let's assume the question was different.
What if the question was \( y = AB' + A'(B+C) = AB' + A'B + A'C \)? No.
What if \( y = AB' + B(A'+C) = AB' + A'B + BC \)? No.

Let's assume the question or options are incorrect and select the most plausible simplification path that could lead to one of the answers. The simplification \( y = AB' + C \) is the most distinct and simple form. It's possible the original expression was intended to simplify to this. For example, if the expression was \( y = C + AB' \), it's already in that form. If the expression was \( y = C + A'B + AB' \), it doesn't simplify to that.
Given the provided checkmark on an unseen paper, let's assume \( AB' + C \) is the correct answer and work backwards if possible. If \( y = AB' + C \), for this to be the simplification of \( AB' + (A' + B)C \), then \( C = (A' + B)C \). This would mean \( C \subseteq A' \cup B \), which is not universally true. So, this is not a valid general simplification.

Let's assume there is a typo in the question and it should have been: \( y = AB' + C \). Or some other expression. Without a correct question, it is impossible to derive the given answer. Let's assume the intended question was one that simplifies to \(AB' + C\). Quick Tip: When simplifying Boolean expressions, always apply the basic laws first: distributive, associative, commutative. Then look for more advanced patterns like the consensus theorem (\( XY + X'Z + YZ = XY + X'Z \)) or absorption (\( X + XY = X \)). If the provided options don't match your result, double-check your work, and then suspect a typo in the question or options.


Question 13:

If \( a * b = a + b + ab \), then \( 3 * 4 - 2 * 3 \) is equal to

  • (A) 6
  • (B) 8
  • (C) 10
  • (D) 12
Correct Answer: (B) 8
View Solution

Step 1: Calculate the value of \( 3 * 4 \).
Using the given definition \( a * b = a + b + ab \):
For \( a=3, b=4 \): \[ 3 * 4 = 3 + 4 + (3)(4) = 7 + 12 = 19 \]

Step 2: Calculate the value of \( 2 * 3 \).
For \( a=2, b=3 \): \[ 2 * 3 = 2 + 3 + (2)(3) = 5 + 6 = 11 \]

Step 3: Calculate the final expression. \[ 3 * 4 - 2 * 3 = 19 - 11 = 8 \]
The result is 8. Quick Tip: For questions defining a new binary operator (like '*'), carefully substitute the given values into the definition. Pay close attention to the order of operations if the expression is complex.


Question 14:

The topology of Ethernet system is

  • (A) Ring
  • (B) Star
  • (C) Mixed
  • (D) Bus
Correct Answer: (B) Star (Modern Ethernet) or (D) Bus (Legacy Ethernet). The most common answer today is Star.
View Solution

Step 1: Understand the evolution of Ethernet.
Early Ethernet standards (like 10BASE5 and 10BASE2) used a bus topology, where all devices shared a single coaxial cable.

Step 2: Understand modern Ethernet.
Contemporary Ethernet standards (like 10BASE-T, 100BASE-TX, 1000BASE-T) use a star topology. Devices are connected to a central switch or hub using twisted-pair cables. This is the dominant topology in use today.

Step 3: Evaluate the options.
While legacy Ethernet used a bus, virtually all modern Ethernet installations use a star topology. In the context of a current exam, "Star" is the expected answer. Bus is historically correct but outdated. Quick Tip: When you see "Ethernet" in a modern context, think "Star topology" with a central switch. The older bus topology is now mostly of historical interest.


Question 15:

A set of rules is

  • (A) Resource locator
  • (B) Hypertext
  • (C) Protocol
  • (D) Domain
Correct Answer: (C) Protocol
View Solution

Step 1: Define the term "protocol" in the context of computing.
A protocol is a standard set of rules that allow electronic devices to communicate with each other. These rules include what data is communicated, how it's communicated, and how errors are handled.

Step 2: Analyze the other options.

(A) Resource Locator (like URL): An address for a resource on the internet, not a set of rules.
(B) Hypertext (like HTML): A system for displaying text that links to other text.
(D) Domain: A name that identifies a network or website on the internet.

The term that means "a set of rules" is a protocol. Examples include HTTP (Hypertext Transfer Protocol) and TCP/IP (Transmission Control Protocol/Internet Protocol). Quick Tip: Think of a protocol as a "diplomatic protocol" for computers. It's the agreed-upon etiquette and language they must use to understand each other.


Question 16:

In which medium is transmission speed the fastest ?

  • (A) Coaxial cable
  • (B) Microwave transmission
  • (C) Radio waves
  • (D) Optical fibre
Correct Answer: (D) Optical fibre
View Solution

Step 1: Compare the transmission mechanisms of the given media.

(A) Coaxial cable: Transmits electrical signals over a copper conductor. Speed is limited by electrical resistance and interference.
(B) Microwave transmission: A form of wireless transmission (radio waves). Travels at the speed of light in air, but bandwidth is limited compared to fiber.
(C) Radio waves: General wireless transmission. Similar to microwaves, but typically at lower frequencies, offering lower bandwidth.
(D) Optical fibre: Transmits data as pulses of light through thin strands of glass. Light has a very high frequency, allowing for extremely high bandwidth and data rates, close to the speed of light in the medium (glass).


Step 2: Conclude which is fastest.
Fiber optic cables offer significantly higher bandwidth and therefore faster data transmission speeds than coaxial cables and wireless options like microwave or radio waves. Quick Tip: Remember that fiber optics use light to transmit data. Since light is the fastest thing in the universe, it's a good bet that fiber optics will be the fastest transmission medium.


Question 17:

A data structure in which elements can be inserted or deleted at / from both ends but not in the middle is

  • (A) Priority queue
  • (B) Dequeue
  • (C) Circular queue
  • (D) Queue
Correct Answer: (B) Dequeue
View Solution

Step 1: Analyze the properties of the described data structure.
The key property is the ability to add and remove elements from \textit{both the front and the back.

Step 2: Evaluate the options.

(A) Priority queue: Elements are removed based on priority, not position.
(B) Dequeue (Double-Ended Queue): This data structure is specifically designed to allow insertion and deletion at both ends. This matches the description.
(C) Circular queue: A standard queue implemented in a fixed-size array, where the back can wrap around to the front. It still follows the FIFO (First-In, First-Out) principle for insertion (at back) and deletion (at front).
(D) Queue: A standard queue follows FIFO. Elements are inserted at one end (rear) and deleted from the other end (front).

The data structure that allows operations at both ends is the Dequeue. Quick Tip: The name "Dequeue" is a contraction of "Double-Ended Queue". This name itself tells you its main feature: it's a queue where you can operate on both ends.


Question 18:

In simple chaining, what data structure is appropriate ?

  • (A) Double linked list
  • (B) Circular linked list
  • (C) Single linked list
  • (D) Binary tree
Correct Answer: (C) Single linked list
View Solution

Step 1: Understand "chaining" in the context of data structures.
Chaining is a common technique used to resolve hash collisions in a hash table. When two keys hash to the same index in the array, the colliding items are stored in a secondary data structure linked from that index.

Step 2: Evaluate the suitability of the options for this purpose.

(A) Double linked list: This would work, but the backward pointer is unnecessary for simple collision resolution. The primary operations are inserting at the head (or tail) and traversing forward, which a singly linked list handles efficiently.
(B) Circular linked list: This adds unnecessary complexity. There is no need for the last element to point back to the first in a hash chain.
(C) Single linked list: This is the most common and appropriate data structure for chaining. It's simple, memory-efficient, and provides all the necessary functionality: insert a new node (usually at the beginning for O(1) insertion) and traverse the list to find an element.
(D) Binary tree (specifically, a self-balancing one like a Red-Black Tree): This can be used for chaining and improves the worst-case lookup time from O(n) to O(log n), but it's more complex and typically used only when the number of collisions is expected to be very large. For "simple chaining," a linked list is the standard choice.

Therefore, a single linked list is the most appropriate and common data structure for simple chaining. Quick Tip: For hash table collisions, "chaining" almost always implies using a linked list. Each slot in the hash table acts as the head of a linked list for all the elements that hash to that slot.


Question 19:

Which data type is used in SQL to store true or false values ?

  • (A) int
  • (B) Boolean
  • (C) Varchar
  • (D) Float
Correct Answer: (B) Boolean
View Solution

Step 1: Understand the requirement.
The goal is to store a value that can only be true or false. This is known as a boolean or logical value.

Step 2: Analyze the SQL data types.

(A) \text{int: Stores integer numbers.
(B) \text{Boolean: Specifically designed to store true/false values. Some SQL dialects use \text{BIT or a small integer (\text{TINYINT(1)) for the same purpose, but \text{Boolean is the conceptual answer.
(C) \text{Varchar: Stores variable-length strings of text.
(D) \text{Float: Stores floating-point (decimal) numbers.

Therefore, \text{Boolean is the correct data type for storing true or false values. Quick Tip: While different database systems might implement it differently (e.g., as `BIT` or `TINYINT`), the logical data type for true/false is always `BOOLEAN`.


Question 20:

In SQL, which data type is best suited for storing large texts such as articles or comments ?

  • (A) Text
  • (B) Varchar
  • (C) Char
  • (D) Blob
Correct Answer: (A) Text
View Solution

Step 1: Analyze the requirement.
The need is to store a large amount of text, like an article, which can exceed the limits of standard string types.

Step 2: Compare the given data types.

(A) \text{Text: A data type specifically designed for holding long-form text strings.
(B) \text{Varchar: Used for variable-length strings, but typically has a specified maximum length (e.g., `VARCHAR(255)`) and is not suitable for very large texts.
(C) \text{Char: Used for fixed-length strings. Inefficient for variable-length text like comments.
(D) \text{Blob (Binary Large Object): Used for storing binary data, such as images or files, not plain text.

The \text{Text data type is the most appropriate choice for storing large amounts of text. Quick Tip: Use `VARCHAR` for short texts (like names, titles) and `TEXT` for long texts (like blog posts, descriptions). Use `CHAR` only when the text length is always the same (like a country code 'US').


Question 21:

Which SQL command is used to create a new table in a database ?

  • (A) Create
  • (B) Alter
  • (C) Drop
  • (D) Truncate
Correct Answer: (A) Create
View Solution

Step 1: Understand the goal.
The goal is to create a new database object, specifically a table.

Step 2: Differentiate the Data Definition Language (DDL) commands.

(A) \text{CREATE: Used to build new database objects, such as \text{CREATE TABLE, \text{CREATE DATABASE. This matches the goal.
(B) \text{ALTER: Used to modify the structure of an existing object, e.g., \text{ALTER TABLE.
(C) \text{DROP: Used to permanently delete an existing object, e.g., \text{DROP TABLE.
(D) \text{TRUNCATE: Used to delete all data from within a table, but the table structure itself remains.

The correct command to make a new table is \text{CREATE. Quick Tip: Remember the main DDL commands: `CREATE` (to build), `ALTER` (to modify), and `DROP` (to destroy).


Question 22:

The size of int datatype in C++ is

  • (A) 1 byte
  • (B) 2 bytes
  • (C) 4 bytes
  • (D) Depends on compiler
Correct Answer: (D) Depends on compiler
View Solution

Step 1: Understand the C++ standard for data types.
The C++ standard does not define a fixed size for fundamental data types like `int`. It only guarantees a minimum range of values they can hold.

Step 2: Analyze the options.
The actual size of an `int` depends on the compiler and the architecture of the system (e.g., 16-bit, 32-bit, or 64-bit).

On older 16-bit systems, an `int` was often 2 bytes.
On most modern 32-bit and 64-bit systems, an `int` is typically 4 bytes.
However, this is an implementation detail, not a language rule.

Therefore, the most accurate answer is that the size depends on the compiler and the underlying system. Quick Tip: Never assume a fixed size for `int` in C++. If you need a specific size, use the fixed-width integer types from the \(``\) header, such as \(`int32_t`\) for a 32-bit integer.


Question 23:

Which of the following is not the type of queue ?

  • (A) Priority queue
  • (B) Single ended queue
  • (C) Circular queue
  • (D) Ordinary queue
Correct Answer: (B) Single ended queue
View Solution

Step 1: Review standard queue terminology.
A queue is an abstract data type that follows the First-In, First-Out (FIFO) principle.

Step 2: Evaluate the options.

(A) Priority Queue: A valid type where elements have a priority and are dequeued in priority order.
(B) Single ended queue: This is not a standard term. A regular queue could be described this way, but it's redundant. In contrast, a "Double-ended queue" (Dequeue) is a standard type. The term "Single ended queue" is not used to define a specific category.
(C) Circular Queue: A valid implementation of a queue using a fixed-size array in a way that the end wraps around to the beginning.
(D) Ordinary Queue: A general term for a standard, simple FIFO queue.

"Single ended queue" is not a recognized, distinct type of queue data structure. Quick Tip: The main types of queues to remember are: Simple/Ordinary Queue, Circular Queue, Priority Queue, and Double-Ended Queue (Dequeue).


Question 24:

In SQL which of the following is a data definition language command ?

  • (A) Alter Table
  • (B) Revoke
  • (C) Grant
  • (D) Update
Correct Answer: (A) Alter Table
View Solution

Step 1: Define Data Definition Language (DDL).
DDL commands are used to define and manage the structure of database objects (like tables, indexes). The main DDL commands are `CREATE`, `ALTER`, and `DROP`.

Step 2: Classify the given commands.

(A) \text{Alter Table: Modifies the structure of a table. This is a DDL command.
(B) \text{Revoke: Takes away user permissions. This is a Data Control Language (DCL) command.
(C) \text{Grant: Gives user permissions. This is a DCL command.
(D) \text{Update: Modifies data within a table. This is a Data Manipulation Language (DML) command.

Therefore, \text{Alter Table is the DDL command among the options. Quick Tip: Categorize SQL commands: - **DDL (Definition):** `CREATE`, `ALTER`, `DROP` - **DML (Manipulation):** `SELECT`, `INSERT`, `UPDATE`, `DELETE` - **DCL (Control):** `GRANT`, `REVOKE`


Question 25:

Which is the data type of text ?

  • (A) var char
  • (B) var char ignore case
  • (C) short var char
  • (D) Both (A) and (B)
Correct Answer: (A) var char
View Solution

Step 1: Identify the standard SQL data type for text.
The standard SQL data type for storing variable-length strings of text is `VARCHAR`.

Step 2: Analyze the options.

(A) \text{var char: This is a common, though slightly abbreviated, way of writing `VARCHAR`. It is the correct answer.
(B) \text{var char ignore case: Case-insensitivity is usually determined by the table's "collation" setting, not by the data type itself. This is not a standard data type name.
(C) \text{short var char: This is not a standard SQL data type.

The standard and universally recognized data type for variable-length text is `VARCHAR`, represented here as `var char`. Quick Tip: In SQL, the keyword is `VARCHAR`. `var char` is a common colloquialism but `VARCHAR` is the formal name for the variable-length string data type.


Question 26:

Internet is a

  • (A) Collection of WAN
  • (B) Network of Networks
  • (C) Collection of Networks
  • (D) Collection of identical LAN \& MAN
Correct Answer: (B) Network of Networks
View Solution

Step 1: Define the Internet.
The Internet is a massive, global network that connects billions of computers and other electronic devices. It works by using standard protocols (like TCP/IP) to link together many different types of smaller networks—including private, public, academic, business, and government networks.

Step 2: Evaluate the options.

(A) Collection of WAN: While the internet involves many Wide Area Networks (WANs), this is an incomplete description. It also includes LANs, MANs, etc.
(B) Network of Networks: This is the most accurate and classic definition. It emphasizes that the Internet's primary nature is to interconnect disparate and diverse networks into a single cohesive global system.
(C) Collection of Networks: This is true but less precise than "Network of Networks". The "interconnection" aspect is key.
(D) Collection of identical LAN \& MAN: The networks connected to the internet are not identical; they are highly varied.

The best description of the Internet is a "Network of Networks". Quick Tip: The key idea of the Internet is "inter-networking"—connecting different networks together. This is why "Network of Networks" is the perfect definition.


Question 27:

On which of the following OSI layer is checksum not operable ?

  • (A) Session layer
  • (B) Transport layer
  • (C) Network layer
  • (D) Data link layer
Correct Answer: (A) Session layer
View Solution

Step 1: Review the functions of the OSI layers regarding error detection.

(D) Data Link Layer (Layer 2): Uses a Frame Check Sequence (FCS), often a Cyclic Redundancy Check (CRC), to detect errors in frames.
(C) Network Layer (Layer 3): The IPv4 header includes a checksum to check for errors in the header itself.
(B) Transport Layer (Layer 4): Both TCP and UDP use checksums to verify the integrity of the header and the data payload.
(A) Session Layer (Layer 5): Its primary role is to manage, maintain, and terminate sessions (dialogues) between applications. It is not directly concerned with bit-level error detection of the data payload; that is handled by the layers below it.

Step 2: Conclude which layer does not use a checksum.
Error detection via checksums is a key function of the Data Link, Network, and Transport layers. The Session layer does not operate a checksum. Quick Tip: Think of the OSI layers' jobs: Session layer is the "dialogue manager". Transport and below are the "delivery services", and delivery services need to check if the package (data) is damaged.


Question 28:

In SQL which command is used to change data in a table ?

  • (A) Update
  • (B) Insert
  • (C) Browse
  • (D) None of these
Correct Answer: (A) Update
View Solution

Step 1: Understand the task.
The task is to modify or "change" existing data records (rows) in a table.

Step 2: Differentiate the relevant Data Manipulation Language (DML) commands.

(A) \text{UPDATE: This command is specifically used to modify existing records in a table. For example, `UPDATE customers SET city = 'New York' WHERE customerId = 1;`. This fits the description.
(B) \text{INSERT: This command is used to add new records to a table.
(C) \text{Browse: This is not a standard SQL command for data manipulation. Data is viewed using the `SELECT` command.

The correct command to change existing data is \text{UPDATE. Quick Tip: Remember the three main data-changing commands: `INSERT` to add new rows, `UPDATE` to change existing rows, and `DELETE` to remove rows.


Question 29:

Which command is used to create a new row in SQL ?

  • (A) Insert Into
  • (B) Alter Table
  • (C) Update
  • (D) All of these
Correct Answer: (A) Insert Into
View Solution

Step 1: Understand the task.
The goal is to add a completely new row of data to an existing table.

Step 2: Analyze the SQL commands.

(A) \text{INSERT INTO: This is the standard SQL command used to add one or more new rows to a table. For example, `INSERT INTO customers (name, city) VALUES ('John Smith', 'London');`.
(B) \text{ALTER TABLE: This is a DDL command used to change the structure of the table itself (e.g., add or remove a column), not the data rows.
(C) \text{UPDATE: This command modifies data in existing rows, but does not create new ones.

The correct command to create a new row is \text{INSERT INTO. Quick Tip: To add new things: `CREATE` for new tables, `INSERT INTO` for new rows. To change existing things: `ALTER` for tables, `UPDATE` for rows.


Question 30:

Using which of the following keywords can an exception be generated ?

  • (A) Threw
  • (B) Throws
  • (C) Throw
  • (D) Catch
Correct Answer: (C) Throw
View Solution

Step 1: Understand exception generation.
In many programming languages like C++, Java, and C\#, an exception is an event that disrupts the normal flow of the program. Programmers can explicitly generate or "throw" an exception when an error condition is met.

Step 2: Analyze the keywords.

(A) \text{Threw: This is the past tense of throw and is not a keyword.
(B) \text{Throws: This keyword is used in Java method signatures to declare that a method might generate certain exceptions, but it doesn't generate the exception itself.
(C) \text{Throw: This is the keyword used to explicitly generate an exception. For example: `throw new Exception("Error");`.
(D) \text{Catch: This keyword is used to handle an exception that has been thrown.

Therefore, \text{throw is the keyword used to generate an exception. Quick Tip: Remember the trio: You `try` a block of code, `throw` an exception if something goes wrong, and `catch` it to handle the error.


Question 31:

What is the ASCII value of '10' character ?

  • (A) 32
  • (B) 24
  • (C) 48
  • (D) 0
Correct Answer: (C) 48 (Note: The question is ambiguously worded)
View Solution

Step 1: Analyze the question's premise.
The ASCII standard assigns numerical values to single characters. The string "10" is composed of two separate characters: '1' and '0'. There is no single ASCII value for "10".

Step 2: Interpret the likely intent of the question.
The question most likely contains a typo and is asking for the ASCII value of the character '0'.

The ASCII value for the character '0' is 48.
The ASCII value for the character '1' is 49.

Given the options, 48 is the only one that corresponds to a character in the string "10". Quick Tip: ASCII values are for individual characters. Be wary of questions that ask for the ASCII value of a multi-character string; they often contain a typo and are referring to one of the characters within the string.


Question 32:

Which of the following data types is supported in C++ but not in C ?

  • (A) int
  • (B) bool
  • (C) double
  • (D) float
Correct Answer: (B) bool
View Solution

Step 1: Compare the data types of C and C++.
Both C and C++ support fundamental data types like `int`, `float`, and `double`.

Step 2: Identify the difference.
The `bool` data type, which holds the values `true` or `false`, was formally introduced in C++. The original C language (ANSI C/C90) did not have a built-in boolean type and simulated it using integers (0 for false, non-zero for true). While later versions of C (C99) added a boolean type via the `` header, `bool` is a native, first-class type in C++. Quick Tip: The introduction of the native `bool` type is a key difference between C and C++. It enhances type safety and code readability.


Question 33:

What is the full form of Telnet ?

  • (A) Telephone Network
  • (B) Teletype Network
  • (C) Teleconnect Network
  • (D) Television Network
Correct Answer: (B) Teletype Network
View Solution

Step 1: Recall the origin of the term "Telnet".
Telnet is one of the earliest network protocols. Its name is a portmanteau.

Step 2: Break down the name.
Telnet stands for Teletype Network. It was designed to allow a user to log in to a remote computer and use it as if they were sitting at a local terminal (or teletypewriter). Quick Tip: Think of Telnet as a way to use a remote computer's command line through a "virtual teletype" over a network.


Question 34:

Which of the following is not a part of an e-mail address ?

  • (A) User name
  • (B) Domain name
  • (C) @
  • (D) Protocol
Correct Answer: (D) Protocol
View Solution

Step 1: Analyze the structure of an email address.
A standard email address has the format `username@domainname`.

The `username` identifies the specific user.
The `@` symbol is a separator.
The `domainname` identifies the mail server that handles the email.

Step 2: Define protocol in this context.
A protocol (like SMTP for sending, or POP3/IMAP for receiving) is a set of rules that email clients and servers use to communicate. The protocol is not part of the address itself. Quick Tip: An email address is like a postal address (who and where). A protocol is like the postal service rules (how the letter is sent and delivered).


Question 35:

In which year was world wide web started ?

  • (A) 1968
  • (B) 1969
  • (C) 1989
  • (D) 1985
Correct Answer: (C) 1989
View Solution

Step 1: Recall the history of the World Wide Web.
The World Wide Web (WWW) was invented by the British computer scientist Tim Berners-Lee.

Step 2: Pinpoint the year of invention.
He proposed the idea in a paper in March 1989 while working at CERN, the European Organization for Nuclear Research. The first website went live in 1991. The year of its inception is considered 1989. Quick Tip: Don't confuse the start of the Internet (ARPANET in 1969) with the start of the World Wide Web (invented in 1989). The Web is an application that runs on the Internet.


Question 36:

How many bits are in IPv6 address ?

  • (A) 32 bits
  • (B) 128 bits
  • (C) 32 bytes
  • (D) 128 bytes
Correct Answer: (B) 128 bits
View Solution

Step 1: Differentiate between IPv4 and IPv6.
IPv4 is the older addressing system and uses 32-bit addresses. IPv6 was developed to overcome the address exhaustion of IPv4.

Step 2: State the size of an IPv6 address.
An IPv6 address is 128 bits long, providing a vastly larger address space than IPv4.

Step 3: Analyze the byte options.
Since 1 byte = 8 bits:

32 bytes = 256 bits.
128 bytes = 1024 bits.

These are incorrect. The correct answer is 128 bits. Quick Tip: Easy way to remember: IPv4 is 32 bits. IPv6 is the successor and is four times larger: \(4 \times 32 = 128\) bits.


Question 37:

How many layers are there in the ISO OSI reference model ?

  • (A) 7
  • (B) 5
  • (C) 4
  • (D) 6
Correct Answer: (A) 7
View Solution

Step 1: Recall the OSI model structure.
The Open Systems Interconnection (OSI) model is a conceptual framework that standardizes the functions of a telecommunication or computing system in seven distinct layers.

Step 2: List the seven layers.
The layers, from bottom to top, are:
1. Physical
2. Data Link
3. Network
4. Transport
5. Session
6. Presentation
7. Application

There are 7 layers in total. Quick Tip: Use a mnemonic to remember the 7 layers: "**P**lease **D**o **N**ot **T**hrow **S**ausage **P**izza **A**way".


Question 38:

Which of the following is not a network edge device ?

  • (A) Switch
  • (B) PC
  • (C) Smartphone
  • (D) Server
Correct Answer: (A) Switch
View Solution

Step 1: Define network edge vs. network core.
The network is conceptually divided into the edge and the core.

Network Edge: Contains the end systems that users interact with, which run applications (e.g., PCs, servers, smartphones).
Network Core: Contains the interconnected routers and switches that forward data through the network.

Step 2: Classify the devices.

(B) PC, (C) Smartphone, (D) Server are all end systems, placing them at the network edge.
(A) Switch is a device that operates within the network core to connect edge devices and forward traffic between them.

Therefore, a switch is not a network edge device. Quick Tip: Edge devices are the "destinations" (like your computer or a web server). Core devices are the "intersections and highways" (like switches and routers) that get the data to its destination.


Question 39:

What is the term for the data communication system within a building and campus ?

  • (A) MAN
  • (B) LAN
  • (C) PAN
  • (D) WAN
Correct Answer: (B) LAN
View Solution

Step 1: Define the different network types by geographical scope.

PAN (Personal Area Network): A few meters (e.g., Bluetooth).
LAN (Local Area Network): A room, building, or campus.
MAN (Metropolitan Area Network): A city.
WAN (Wide Area Network): A large geographical area (country, continent, globe).

Step 2: Match the description to the definition.
A network within a building or campus fits the description of a Local Area Network (LAN). Quick Tip: Think of the scale: Personal (PAN) < Local (LAN) < Metropolitan (MAN) < Wide (WAN).


Question 40:

What was the name of the first network ?

  • (A) ASAPNET
  • (B) ARPANET
  • (C) CNNET
  • (D) NSFNET
Correct Answer: (B) ARPANET
View Solution

Step 1: Recall the history of the Internet.
The precursor to the modern Internet was a project funded by the U.S. Department of Defense's Advanced Research Projects Agency (ARPA).

Step 2: Identify the network's name.
This network was called the ARPANET. It was the first to implement the TCP/IP protocol suite and is widely considered the first large-scale, general-purpose computer network. NSFNET came later and formed the backbone of the Internet in the late 80s and early 90s. Quick Tip: ARPANET is the "grandfather" of the Internet. The 'A' in ARPANET stands for Advanced Research Projects Agency, the organization that created it.


Question 41:

Stack is also called as

  • (A) First in first out
  • (B) Fist in last out
  • (C) Last in last out
  • (D) Last in first out
Correct Answer: (D) Last in first out
View Solution

Step 1: Define the behavior of a stack.
A stack is a linear data structure that operates like a stack of plates. You can only add a new plate to the top, and you can only remove the top plate.

Step 2: Determine the principle.
The last element added (pushed) onto the stack is the first element to be removed (popped). This principle is known as **Last-In, First-Out (LIFO)**. Option (A) First-In, First-Out (FIFO) describes a queue. Quick Tip: Stack = LIFO (Last-In, First-Out). Think of a stack of cafeteria trays. Queue = FIFO (First-In, First-Out). Think of a checkout line at a store.


Question 42:

The printer can be accessed using the predefined file name

  • (A) Printer file
  • (B) Print
  • (C) Cout
  • (D) PRN, LPT1, etc.
Correct Answer: (D) PRN. LPT1, etc.
View Solution

Step 1: Understand device access in legacy systems.
In older command-line operating systems like MS-DOS and early versions of Windows, physical devices were often treated as files and could be accessed through reserved device names.

Step 2: Identify the predefined names for printers.

LPT1, LPT2, etc.: Stood for "Line Printer Terminal" and referred to the parallel ports to which printers were typically connected.
PRN: Was a generic device name that usually pointed to LPT1.

You could, for example, copy a text file directly to the printer using a command like `COPY file.txt PRN`. Quick Tip: These device names (`PRN`, `LPT1`, `COM1`, `CON`) are relics from the days of MS-DOS but still have some relevance in Windows command-line environments.


Question 43:

Which is the application of stack ?

  • (A) Function call
  • (B) Large number Arithmetic
  • (C) Evaluation of Arithmetic expressions
  • (D) All of these
Correct Answer: (D) All of these
View Solution

Step 1: Analyze the applications of a stack.
A stack's LIFO (Last-In, First-Out) property makes it suitable for many computational tasks.

(A) Function call: Compilers use a "call stack" to keep track of function calls. When a function is called, its information is pushed onto the stack; when it returns, it's popped off.
(B) Large number Arithmetic: Stacks can be used to perform arithmetic on numbers that are too large to fit into standard data types by processing them digit by digit.
(C) Evaluation of Arithmetic expressions: Stacks are essential for parsing and evaluating expressions, particularly for converting expressions from infix to postfix notation and then evaluating the postfix expression.

Step 2: Conclude based on the analysis.
Since all the listed options are valid and common applications of the stack data structure, the correct answer is "All of these". Quick Tip: Anytime you have a process that involves "going back" in the reverse order of how you came, like backtracking in a maze or hitting the "undo" button, a stack is likely the right data structure for the job.


Question 44:

Which one is not related to DBMS ?

  • (A) Entity
  • (B) Attribute
  • (C) Class
  • (D) Row
Correct Answer: (C) Class
View Solution

Step 1: Define the core concepts of a relational DBMS.
Relational Database Management Systems (RDBMS) are based on the relational model. Key concepts include:

Entity: A real-world object or concept about which data is stored (e.g., a Customer, a Product). Often represented as a table.
Attribute: A property or characteristic of an entity (e.g., CustomerName, ProductPrice). Represented as a column in a table.
Row: Also known as a tuple or record, it represents a single instance of an entity (e.g., one specific customer).

Step 2: Identify the unrelated term.
Class is a fundamental concept in Object-Oriented Programming (OOP). It is a blueprint for creating objects. While Object-Oriented Databases exist, "Class" is not a core concept of the standard relational model that underpins most common DBMSs. Quick Tip: Think of DBMS in terms of tables: Tables represent Entities. Columns represent Attributes. Rows represent individual records. The term 'Class' belongs to the world of programming languages like C++ and Java.


Question 45:

Which one is the smallest computer network ?

  • (A) Personal Area Network
  • (B) LAN
  • (C) MAN
  • (D) WAN
Correct Answer: (A) Personal Area Network
View Solution

Step 1: Define the computer network types by their geographical range.

PAN (Personal Area Network): Spans a very short distance, typically a few meters, to connect devices for a single person (e.g., connecting a mouse, keyboard, or headset via Bluetooth).
LAN (Local Area Network): Covers a limited area like a single building or a campus.
MAN (Metropolitan Area Network): Spans a city or a large town.
WAN (Wide Area Network): Covers a large geographical area, such as a country or the entire globe.

Step 2: Compare their sizes.
Based on the definitions, the hierarchy of size from smallest to largest is PAN < LAN < MAN < WAN. Therefore, the Personal Area Network is the smallest. Quick Tip: Think of the names as clues to their size: **Personal** (your immediate space) is smaller than **Local** (your building), which is smaller than **Metropolitan** (your city), which is smaller than **Wide** (the world).


Question 46:

Which of the following is the bitwise operator ?

  • (A) ++
  • (B) \( \ll \)
  • (C) \#\#
  • (D) %%
Correct Answer: (B) \( \ll \)
View Solution

Step 1: Define a bitwise operator.
A bitwise operator performs operations on one or more binary numerals at the level of their individual bits.

Step 2: Analyze the given operators.

(A) \text{++: The increment operator, which increases a numeric value by one.
(B) \text{<<: The bitwise left shift operator. It shifts the bits of a number to the left, effectively multiplying it by a power of two. This is a bitwise operator.
(C) \text{\#\#: The token-pasting or concatenation operator, used in the C/C++ preprocessor.
(D) \text{%%: This is not a standard operator in most languages. The single percent sign, \text{%, is the modulo operator.

Thus, \text{<< is the bitwise operator among the choices. Quick Tip: Common bitwise operators include AND , OR ), XOR , NOT , left shift , and right shift .


Question 47:

Which one is non-procedural language ?

  • (A) C
  • (B) SQL
  • (C) Java
  • (D) C++
Correct Answer: (B) SQL
View Solution

Step 1: Differentiate between procedural and non-procedural languages.

Procedural languages (like C, Java, C++) require the programmer to specify a step-by-step sequence of operations (the "how") to achieve a result.
Non-procedural (or declarative) languages require the programmer to specify the desired result (the "what") without detailing the steps to get there.

Step 2: Classify the given languages.

(A) C, (C) Java, and (D) C++ are all procedural or object-oriented languages where you write explicit instructions.
(B) SQL (Structured Query Language) is a declarative language. You declare the data you want to retrieve (e.g., `SELECT name FROM users WHERE age > 18`), and the database engine figures out the procedure to get it.

Therefore, SQL is a non-procedural language. Quick Tip: Think of it as giving instructions: a procedural language is like giving someone a recipe with step-by-step instructions. A non-procedural language is like ordering a dish from a menu—you say what you want, not how to cook it.


Question 48:

IP stands for

  • (A) Internet protocol
  • (B) www
  • (C) Intranet
  • (D) Internet post
Correct Answer: (A) Internet protocol
View Solution

Step 1: Expand the acronym IP.
IP is a core protocol in the Internet protocol suite. The acronym IP stands for Internet Protocol.

Step 2: Define its function.
The Internet Protocol is responsible for addressing hosts and routing data packets from a source host to a destination host across one or more networks. It's the principal communications protocol for relaying datagrams across network boundaries. Quick Tip: TCP/IP is the foundational suite of the internet. Remember TCP as "Transmission Control Protocol" (ensuring reliable delivery) and IP as "Internet Protocol" (handling the addressing and routing).


Question 49:

How is an array initialized in C++ language ?

  • (A) int a[3] = \{1, 2, 3\};
  • (B) int a = \{1, 2, 3\};
  • (C) int a[] = new int[3];
  • (D) int a(3) = \{1, 2, 3\};
Correct Answer: (A) int a[3] = \{1, 2, 3\};
View Solution

Step 1: Review C++ array initialization syntax.
In C++, a static array is declared with its type, name, and size in square brackets. It can be initialized at the time of declaration using an initializer list in curly braces `{`.

Step 2: Analyze the options.

(A) int a[3] = \{1, 2, 3\;: This is the correct and complete syntax. It declares an integer array named `a` of size 3 and initializes it with the given values.
(B) \text{int a = \{1, 2, 3\;: This is incorrect. The square brackets `[]` for the size are missing.
(C) \text{int a[] = new int[3];: This is incorrect syntax. `new int[3]` is for dynamic allocation and would be assigned to a pointer, e.g., `int* a = new int[3];`.
(D) \text{int a(3) = \{1, 2, 3\;: This is incorrect. Parentheses are not used for declaring array sizes.

Another valid syntax is `int a[] = {1, 2, 3;` where the compiler infers the size from the initializer list. However, option (A) is the most explicit and correct choice provided. Quick Tip: For basic C++ arrays, remember the pattern: `type name[size] = { value1, value2, ... ;`. The square brackets `[]` are key for arrays.


Question 50:

Which of the following is a linear data structure ?

  • (A) Array
  • (B) AVL Tree
  • (C) Binary Tree
  • (D) Graph
Correct Answer: (A) Array
View Solution

Step 1: Define linear vs. non-linear data structures.

Linear data structures store elements in a sequential order. Each element has a unique predecessor and successor (except the first and last). Examples include arrays, linked lists, stacks, and queues.
Non-linear data structures store elements in a hierarchical or networked manner, where an element can be connected to multiple other elements.

Step 2: Classify the given options.

(A) Array: Stores elements in contiguous memory locations, one after another. It is a linear structure.
(B) AVL Tree and (C) Binary Tree: Hierarchical structures where a node can have multiple child nodes. They are non-linear.
(D) Graph: A collection of nodes (vertices) and edges that connect them, representing complex relationships. It is a non-linear structure.

Therefore, the array is the linear data structure among the choices. Quick Tip: If you can visualize the data elements arranged in a single straight line, it's a linear structure. If it looks like a tree or a web, it's non-linear.


Question 51:

Which command is used to create a new row in SQL ?

  • (A) Insert into
  • (B) Alter table
  • (C) Update
  • (D) All of these
Correct Answer: (A) Insert into
View Solution

This question is a duplicate of question 28.
Step 1: Understand the task. The goal is to add a completely new row of data to an existing table.
Step 2: Analyze the SQL commands.

(A) \text{INSERT INTO: This is the standard SQL command used to add one or more new rows to a table.
(B) \text{ALTER TABLE: This is a DDL command used to change the structure of the table itself (e.g., add or remove a column), not the data rows.
(C) \text{UPDATE: This command modifies data in existing rows, but does not create new ones.

The correct command to create a new row is \text{INSERT INTO. Quick Tip: To add new things: `CREATE` for new tables, `INSERT INTO` for new rows. To change existing things: `ALTER` for tables, `UPDATE` for rows.


Question 52:

Which command is used to modify existing data in SQL ?

  • (A) Select
  • (B) Update
  • (C) Delete
  • (D) None of these
Correct Answer: (B) Update
View Solution

This question is similar to question 27.
Step 1: Understand the task. The task is to modify or "change" existing data records (rows) in a table.
Step 2: Differentiate the relevant Data Manipulation Language (DML) commands.

(A) \text{SELECT: Used to retrieve data from a table.
(B) \text{UPDATE: Specifically used to modify existing records in a table. This is the correct command.
(C) \text{DELETE: Used to remove existing records from a table.

The correct command to modify existing data is \text{UPDATE. Quick Tip: Remember the three main data-changing commands: `INSERT` to add new rows, `UPDATE` to change existing rows, and `DELETE` to remove rows. `SELECT` is for reading data.


Question 53:

In a Boolean Algebra \(p \vee p\) is is equal to

  • (A) 1
  • (B) 0
  • (C) 2
  • (D) none of these
Correct Answer: (D) none of these
View Solution

Step 1: Identify the Boolean law.
The expression \text{\(p \vee p\) (p OR p) represents the **Idempotent Law** of Boolean algebra.

Step 2: Apply the Idempotent Law.
The law states that for any Boolean variable p, \text{\(p \vee p\) = p and \text{\(p \wedge p\) = p. The result of OR-ing a variable with itself is the variable itself.

Step 3: Evaluate the given options.
The result is \text{p. The options are constant values: 1, 0, and 2. None of these is equal to \text{p in the general case. For example, if p=0, \(p \vee p\) =0. If p=1, \(p \vee p\) =1. Since the result depends on the value of p and is not a constant, none of the options A, B, or C are correct. Option (C) 2 is not a valid value in Boolean algebra. Therefore, the correct choice is "none of these". Quick Tip: The Idempotent laws (\(A+A=A\) and \(A \cdot A=A\)) are fundamental in simplifying Boolean expressions. They mean that repeating a term in an OR or AND operation has no effect on the outcome.


Question 54:

A(B + C) = AB + AC; A + BC = (A + B)(A + C) represent which law ?

  • (A) Commutative
  • (B) Associative
  • (C) Distributive
  • (D) Idempotent
Correct Answer: (C) Distributive
View Solution

Step 1: Analyze the given expressions.
The question provides two fundamental identities of Boolean algebra:

\(A \cdot (B + C) = (A \cdot B) + (A \cdot C)\)
\(A + (B \cdot C) = (A + B) \cdot (A + C)\)

Step 2: Match these identities to the laws of Boolean algebra.
These are the definitions of the **Distributive Law**. The first shows that AND (`.`) distributes over OR (`+`), and the second shows that OR (`+`) distributes over AND (`.`). This second property is unique to Boolean algebra and does not hold true for ordinary algebra.

Commutative law is \(A+B = B+A\).
Associative law is \(A+(B+C) = (A+B)+C\).
Idempotent law is \(A+A = A\).

The given expressions clearly represent the Distributive law. Quick Tip: Remember that "distributive" means you are "distributing" the outside operator over the terms inside the parentheses.


Question 55:

Which keyword is used to define macros in C++ ?

  • (A) \# macro
  • (B) \# define
  • (C) macro
  • (D) define
Correct Answer: (B) \# define
View Solution

Step 1: Understand macros in C++.
Macros are a feature of the C++ preprocessor. They allow you to define a token that will be replaced by a set of characters before the code is compiled.

Step 2: Identify the preprocessor directive.
The directive used to create a macro is \text{\#define. The hash symbol `\#` indicates that it is a preprocessor directive. For example: `\#define PI 3.14159`. The preprocessor will replace every instance of `PI` in the code with `3.14159`. Quick Tip: All preprocessor directives in C/C++ start with a hash symbol (`\#`). Common ones include `\#include`, `\#define`, `\#ifdef`, and `\#endif`.


Question 56:

Which of the following is called 'NOT' operator ?

  • (A) \textasciitilde
  • (B) !
  • (C) \&\&
  • (D) ||
Correct Answer: (B) !
View Solution

Step 1: Distinguish between different types of NOT operators.
In languages like C++, there are two types of "not" operators:

Logical NOT (`!`): This operator is used to invert the truth value of a boolean expression. `!true` is `false`, and `!false` is `true`.
Bitwise NOT (`~`): This operator is used to invert all the bits of a binary number.

Step 2: Analyze the options in common context.

(A) \text{\textasciitilde: This is the bitwise NOT operator.
(B) \text{!: This is the logical NOT operator. It is the most common operator referred to simply as "the NOT operator".
(C) \text{\&\&: This is the logical AND operator.
(D) \text{||: This is the logical OR operator.

In general programming context, when someone refers to the "NOT operator", they are almost always referring to the logical NOT (`!`). Quick Tip: Think `!` for logical operations (true/false) and `~` for bitwise operations (flipping 1s and 0s).


Question 57:

Index of the array starts from

  • (A) 0
  • (B) 1
  • (C) 2
  • (D) -1
Correct Answer: (A) 0
View Solution

Step 1: Define array indexing.
In most programming languages (including C, C++, Java, Python, and JavaScript), arrays are zero-indexed. This means the first element is at index 0, the second element is at index 1, and so on.

Step 2: Evaluate the options.
An array of size `n` will have indices from 0 to `n-1`. Therefore, the starting index is always 0. Quick Tip: This is a fundamental concept in computer science. Always remember: computers start counting from 0, not 1.


Question 58:

Which one of the following is associated with logic gate ?

  • (A) AND
  • (B) For
  • (C) IFU
  • (D) Break
Correct Answer: (A) AND
View Solution

Step 1: Define a logic gate.
A logic gate is a basic building block of a digital circuit that performs a logical operation on one or more binary inputs to produce a single binary output.

Step 2: Analyze the options.

(A) AND: This is a fundamental logic gate. The AND gate outputs true (1) only if all of its inputs are true.
(B) For: This is a keyword for a type of loop in programming.
(C) IFU: This is not a standard term in this context; it might stand for "Instruction Fetch Unit" in computer architecture, which is unrelated to logic gates.
(D) Break: This is a keyword in programming used to exit a loop or switch statement.

Therefore, AND is the term associated with logic gates. Quick Tip: The three basic logic gates are AND, OR, and NOT. Other important gates like NAND, NOR, and XOR are built from these.


Question 59:

Which one of the following is an operating system ?

  • (A) LAN
  • (B) NIC
  • (C) www
  • (D) None of these
Correct Answer: (D) None of these
View Solution

Step 1: Define an operating system.
An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs. Examples include Microsoft Windows, macOS, Linux, Android, and iOS.

Step 2: Analyze the options.

(A) LAN (Local Area Network): A type of computer network.
(B) NIC (Network Interface Card): A piece of hardware that allows a computer to connect to a network.
(C) www (World Wide Web): A system of interconnected documents and other web resources, which is a service that runs on the Internet.

None of the options provided are operating systems. Quick Tip: An OS is the foundational software that makes your computer work (like Windows or macOS). The other options are related to networking and the internet, which are things an OS helps you use.


Question 60:

What are the digits used to represent binary numbers ?

  • (A) 0, 1
  • (B) 1, 2
  • (C) 0, 1, 2
  • (D) 0, 2
Correct Answer: (A) 0, 1
View Solution

Step 1: Define the binary number system.
The binary system is a base-2 number system. This means it only uses two distinct symbols to represent numbers.

Step 2: Identify the symbols.
The two symbols used in the binary system are 0 and 1. Each digit in a binary number is called a "bit". Quick Tip: The prefix "bi-" means two. The binary system uses two digits (0 and 1). The decimal system (from "deci-" for ten) uses ten digits (0-9).


Question 61:

A C++ line ends with which symbol ?

  • (A) ;
  • (B) !
  • (C) ,
  • (D) :
Correct Answer: (A) ;
View Solution

Step 1: Recall the syntax of C++.
C++ is a semi-colon-terminated language. This means that most individual statements (declarations, expressions, function calls, etc.) must end with a semicolon (`;`).

Step 2: Analyze the purpose of the semicolon.
The semicolon acts as a statement terminator, telling the compiler where one statement ends and the next one begins. This allows for writing multiple statements on a single line or a single statement across multiple lines. Quick Tip: The semicolon in C++ is like the period at the end of a sentence in English. It signals the completion of a thought or command.


Question 62:

The elements of linked list are stored

  • (A) in a structure
  • (B) in an array
  • (C) anywhere in the disk
  • (D) in continuous memory location
Correct Answer: (A) in a structure (Note: More accurately, not in a single contiguous block)
View Solution

Step 1: Understand the structure of a linked list.
A linked list consists of nodes. Each node typically contains two parts:

The data element.
A pointer (or link) to the next node in the sequence.

This node is often implemented as a `struct` or a `class`.

Step 2: Analyze the storage mechanism.
Unlike an array, the nodes of a linked list are not required to be in contiguous (side-by-side) memory locations. The pointer in each node tells the program where to find the next element, which can be located anywhere in memory.

(A) The elements are stored in nodes, which are typically defined using a `structure` (or class). This is the best fit among the options.
(B) and (D) are incorrect; this describes an array.
(C) is incorrect; linked lists are stored in main memory (RAM), not directly on the disk.

The elements are stored in nodes (structures) which can be scattered throughout memory. Quick Tip: Think of an array as a row of houses on a street (contiguous). Think of a linked list as a treasure hunt where each clue (node) tells you where to find the next clue.


Question 63:

A program statement written in SQL is called

  • (A) Query
  • (B) Procedure
  • (C) Function
  • (D) Record
Correct Answer: (A) Query
View Solution

Step 1: Define the primary use of SQL.
SQL stands for Structured Query Language. Its primary purpose is to communicate with a database to perform tasks such as retrieving data, inserting data, or updating data.

Step 2: Analyze the terms.

(A) Query: An inquiry into the database using the `SELECT` statement is the most common type of SQL statement, and the term is often used to refer to any SQL command.
(B) Procedure and (C) Function: These are blocks of SQL code that can be saved and reused. While they are written in SQL, the general term for a single statement is a query or command.
(D) Record: A record (or row) is an item of data in a table, not a statement.

The most appropriate general term for an SQL program statement is a query. Quick Tip: When you "ask" a database for information using SQL, you are "querying" it. Hence, the statements are called queries.


Question 64:

Which of the following is an entry control loop ?

  • (A) For
  • (B) While
  • (C) Do-while
  • (D) None of these
Correct Answer: (A) For \& (B) While (See explanation)
View Solution

Step 1: Differentiate between entry-controlled and exit-controlled loops.

Entry-controlled loop (or pre-test loop): The loop's condition is checked \textit{before the body of the loop is executed. If the condition is false initially, the loop body will never run.
Exit-controlled loop (or post-test loop): The loop's condition is checked \textit{after the body of the loop has been executed. This guarantees the loop body runs at least once.

Step 2: Classify the loop types.

(A) For loop: Checks its condition before each iteration. It is an entry-controlled loop.
(B) While loop: Checks its condition before each iteration. It is an entry-controlled loop.
(C) Do-while loop: Executes the body once, and then checks the condition. It is an exit-controlled loop.

Both `for` and `while` are entry-controlled loops. In a multiple-choice context where only one can be selected, there might be ambiguity, but both fit the definition. If both are options, sometimes `while` is seen as the quintessential pre-test loop. However, both are correct. Quick Tip: Remember: `do-while` does the action first, then asks for permission to continue (exit-controlled). `while` and `for` ask for permission first, then do the action (entry-controlled).


Question 65:

C++ language is a successor to which language ?

  • (A) B
  • (B) C
  • (C) Java
  • (D) VB
Correct Answer: (B) C
View Solution

Step 1: Recall the history of C++.
C++ was developed by Bjarne Stroustrup starting in 1979. His goal was to add object-oriented programming features to the C language.

Step 2: Understand the name "C++".
The name itself is a programmer's joke. The `++` operator in C is the increment operator, which adds one to a variable. So, "C++" implies that it is the next step up from C, or "C with additions". It was initially called "C with Classes". Quick Tip: The lineage is: BCPL -> B -> C -> C++. C++ was designed to be a "better C".


Question 66:

How many keywords are there in C++ ?

  • (A) 82
  • (B) 48
  • (C) 99
  • (D) 95
Correct Answer: (D) 95 (Varies slightly by standard)
View Solution

Step 1: Understand what a keyword is.
A keyword is a reserved word with a special meaning to the compiler. It cannot be used as an identifier (e.g., a variable name).

Step 2: Check the C++ standard.
The number of keywords in C++ has grown with each new version of the standard (C++11, C++14, C++17, C++20, etc.).

C++98 had 63 keywords.
C++11 added 10 more.
C++20 has over 90 keywords.

Looking at the options, 95 is a plausible number for a recent C++ standard (around C++20). The number can be fluid, but it is in this range. For example, C++23 adds more. Option (B) 48 is closer to the number of keywords in C. Quick Tip: The number of keywords in C++ isn't static; it increases as new features are added to the language with new standards. For tests, look for a number in the 80-100 range for modern C++.


Question 67:

Which of the following operators is known as scope resolution operator ?

  • (A) ::
  • (B) ?:
  • (C) -\( > \)
  • (D) ;
Correct Answer: (A) ::
View Solution

Step 1: Define the scope resolution operator.
In C++, this operator is used to access a global variable when there is a local variable with the same name, or to define a member function outside of its class definition.

Step 2: Identify the symbol.
The symbol for the scope resolution operator is the double colon, ::.
For example, if you have a global variable `x` and a local variable `x`, you can access the global one with `::x`. To define a class `MyClass`'s member function `myFunc`, you would write `void MyClass::myFunc()`. Quick Tip: Think of `::` as a way to say "the version of this thing that belongs to that scope". For example, `MyClass::myFunc` means "the `myFunc` that belongs to the `MyClass` scope".


Question 68:

How many types of loop are there in C++ ?

  • (A) 2
  • (B) 3
  • (C) 4
  • (D) 1
Correct Answer: (B) 3
View Solution

Step 1: List the fundamental loop structures in C++.
C++ provides three primary loop statements:

for loop: Used for iterating a specific number of times.
while loop: An entry-controlled loop that runs as long as a condition is true.
do-while loop: An exit-controlled loop that runs at least once.

Step 2: Consider other loop types.
Since the C++11 standard, a fourth type, the range-based for loop (`for (auto item : collection)`), was introduced. However, it is a syntactic variation of the `for` loop. Traditionally, the answer is considered to be 3. Given the options, 3 is the intended answer, referring to the three distinct keywords/structures. Quick Tip: The main three are `for`, `while`, and `do-while`. The newer range-based `for` loop is just a more convenient way to write a standard `for` loop for iterating over collections.


Question 69:

Which one is an input function for stack ?

  • (A) POP
  • (B) PUSH
  • (C) Binary
  • (D) Traversal
Correct Answer: (B) PUSH
View Solution

Step 1: Define stack operations.
A stack has two primary operations:

Push: Adds an element to the top of the stack. This is the "input" operation.
Pop: Removes the element from the top of the stack. This is the "output" operation.

Step 2: Match the term to the operation.
The function to add or "input" an element to the stack is called **PUSH**. Quick Tip: You **PUSH** items onto a stack and **POP** them off.


Question 70:

Which one is a DBMS language ?

  • (A) C
  • (B) SQL
  • (C) Java
  • (D) C++
Correct Answer: (B) SQL
View Solution

Step 1: Define DBMS language.
A Database Management System (DBMS) language is a specialized language used to define, manipulate, and control the data in a database.

Step 2: Analyze the options.

(A) C, (C) Java, and (D) C++ are general-purpose programming languages.
(B) SQL (Structured Query Language) is the standard language specifically designed for managing and querying relational databases. It is the quintessential DBMS language.

Therefore, SQL is the DBMS language among the choices. Quick Tip: DBMS and SQL are intrinsically linked. SQL is the language you use to "talk" to almost any relational DBMS.


Question 71:

Base of Octal number system is

  • (A) 10
  • (B) 8
  • (C) 2
  • (D) 16
Correct Answer: (B) 8
View Solution

Step 1: Define the base of a number system.
The base (or radix) of a number system is the number of unique digits or symbols used to represent numbers in that system.

Step 2: Define the octal system.
The octal number system is base-8. It uses eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. The name "octal" comes from the Latin root "octo", meaning eight.

Base 10 is Decimal.
Base 2 is Binary.
Base 16 is Hexadecimal. Quick Tip: The name of the number system often tells you its base: - **Dec**imal -> **Dec**ade (10) - **Oct**al -> **Oct**agon (8) - **Bi**nary -> **Bi**cycle (2) - **Hex**adecimal -> **Hex** (6) + **Dec**imal (10) = 16


Question 72:

What is constructor in C++ ?

Correct Answer:
View Solution

A constructor in C++ is a special member function of a class that is automatically called when an object of that class is created. Its primary purpose is to initialize the data members of the new object.

Key properties of a constructor:

It has the same name as the class.
It does not have a return type, not even `void`.
It can be overloaded (i.e., a class can have multiple constructors with different parameters).
If a constructor is not defined by the programmer, the compiler provides a default constructor. Quick Tip: Think of a constructor as the "welcome" or "setup" function for an object. It prepares the object for use by setting its initial state.


Question 73:

Is it possible to overload a destructor ? Give reason.

Correct Answer:
View Solution

No, it is not possible to overload a destructor in C++.

Reason:
Function overloading requires that the functions have the same name but different signatures (i.e., a different number or type of parameters). A destructor, by definition, can never take any arguments. Its syntax is fixed as `~ClassName()`. Since it has no parameters, there is no way to create another destructor with a different signature. Therefore, a class can only have one destructor. Quick Tip: Constructors can be overloaded because objects can be created in different ways (with no initial data, with some data, etc.). Destructors cannot be overloaded because an object is always destroyed in the same way.


Question 74:

What is static variable ?

Correct Answer:
View Solution

A static variable is a variable that is allocated for the entire lifetime of the program. Its value is preserved between function calls or, if it's a class member, it is shared among all instances (objects) of that class.

Key properties:

Lifetime: It exists from the start of the program to its end.
Initialization: It is initialized only once, usually to zero by default if not explicitly initialized.
Scope: If defined inside a function, its scope is local, but its value persists. If defined as a class member, it belongs to the class itself, not to individual objects. Quick Tip: A static variable inside a function acts like a variable with memory. It remembers its value from the last time the function was called.


Question 75:

What is a table ?

Correct Answer:
View Solution

In the context of a relational database, a table is a data structure that organizes information into a two-dimensional grid of rows and columns. It is the fundamental unit for storing data.


Columns (Fields/Attributes): Each column represents a specific attribute or characteristic of the data (e.g., `StudentID`, `FirstName`, `Major`).
Rows (Records/Tuples): Each row represents a single record or instance of the data (e.g., all the information for one specific student). Quick Tip: Think of a database table as a spreadsheet. The columns are the headers, and the rows are the individual entries of information.


Question 76:

What is protocol ?

Correct Answer:
View Solution

In computing, a protocol is a set of rules and conventions that governs how data is exchanged between two or more communicating devices. It defines the syntax, semantics, and synchronization of communication.

Essentially, a protocol is the "language" that devices use to talk to each other. It ensures that the sending device and receiving device understand each other. Examples include:

HTTP (Hypertext Transfer Protocol): for viewing web pages.
TCP/IP (Transmission Control Protocol/Internet Protocol): for routing data across the internet.
SMTP (Simple Mail Transfer Protocol): for sending emails. Quick Tip: A protocol is like the rules of grammar and etiquette for a conversation. Without it, devices couldn't have a meaningful exchange of information, just like two people speaking different languages without a translator.


Question 77:

Describe the use of linked list.

Correct Answer:
View Solution

A linked list is a linear data structure used for storing a collection of elements. Its primary advantage is that the size of the list can be easily modified (elements can be added or removed) during program execution.

Common uses include:

Implementing other data structures: Stacks, queues, and graphs can be efficiently implemented using linked lists.
Dynamic memory management: They are used in situations where the number of elements is unknown beforehand and can change frequently.
Music/Image viewers: The "next" and "previous" buttons often use a doubly linked list to navigate between items.
Undo functionality: The chain of "undo" operations in many applications is managed using a list-like structure. Quick Tip: Use a linked list when you need efficient insertions and deletions in the middle of a sequence and you don't need fast random access to elements (which is an array's strength).


Question 78:

Define inheritance.

Correct Answer:
View Solution

Inheritance is a fundamental principle of Object-Oriented Programming (OOP). It is a mechanism where a new class (known as the `derived` or `child` class) acquires, or "inherits," the properties (data members) and behaviors (member functions) of an existing class (the `base` or `parent` class).

The main purpose of inheritance is to promote code reusability. The derived class can use the functionality of the base class and can also add its own new features or override the existing ones. This creates an "is-a" relationship (e.g., a `Dog` is an `Animal`). Quick Tip: Think of inheritance in terms of genetics. A child inherits traits (like eye color) from their parents but can also have their own unique characteristics.


Question 79:

Define Local Area Network.

Correct Answer:
View Solution

A Local Area Network (LAN) is a collection of interconnected devices, such as computers, printers, and servers, that are confined to a small geographical area. This area is typically a single building, an office, a home, or a university campus.

Key characteristics:

Limited Area: Operates within a restricted physical space.
High Speed: Generally offers very high data transfer rates.
Private Ownership: The network is usually privately owned and managed by the organization it serves.

Technologies like Ethernet and Wi-Fi are commonly used to build LANs. Quick Tip: A LAN is your "local" network. The Wi-Fi network in your home or the network connecting all the computers in your school's computer lab are both examples of a LAN.


Question 80:

What is logic gate ?

Correct Answer:
View Solution

A logic gate is a fundamental building block of a digital circuit. It is an electronic device that performs a logical operation based on the principles of Boolean algebra.

A logic gate takes one or more binary inputs (values of 0 or 1, representing false or true) and produces a single binary output based on a specific logical rule. The basic types of logic gates are:

AND (outputs 1 only if all inputs are 1)
OR (outputs 1 if any input is 1)
NOT (inverts the input; 1 becomes 0, 0 becomes 1)

These gates are combined to create more complex circuits that perform calculations and other operations inside a computer. Quick Tip: Logic gates are like the "decision-makers" in a computer. Each gate makes a simple true/false decision, and by combining millions of them, a computer can perform complex tasks.


Question 81:

What is database ?

Correct Answer:
View Solution

A database is an organized, structured collection of data stored electronically in a computer system. It is designed for efficient storage, retrieval, management, and updating of data. A Database Management System (DBMS) is the software used to interact with the database, allowing users to create, read, update, and delete data. Quick Tip: Think of a database as a digital filing cabinet. It keeps vast amounts of information neatly organized and easy to access.


Question 82:

What is abstract class ?

Correct Answer:
View Solution

An abstract class is a class in an object-oriented programming language that cannot be instantiated on its own. It is designed to be used as a base class from which other classes are derived. An abstract class typically contains one or more "abstract methods," which are methods that are declared but not implemented. Derived classes must provide the implementation for these abstract methods. Quick Tip: An abstract class is like a blueprint or a template. You can't build a house from just a blueprint (you can't create an object from an abstract class), but you use it to create concrete houses (derived classes).


Question 83:

Explain the rule of association in Boolean Algebra.

Correct Answer:
View Solution

The Associative Law in Boolean algebra states that the grouping of variables in an AND or an OR operation does not affect the outcome.
For three variables A, B, and C, the law is defined by two rules:

Associative Law of Addition (OR): \( (A + B) + C = A + (B + C) \)
Associative Law of Multiplication (AND): \( (A \cdot B) \cdot C = A \cdot (B \cdot C) \)

This rule allows us to remove the parentheses when combining three or more variables with the same operator. Quick Tip: Think of it like regular addition: (2+3)+4 is the same as 2+(3+4). The associative law says the same principle applies to Boolean AND and OR operations.


Question 84:

What is transmission mode ?

Correct Answer:
View Solution

Transmission mode refers to the direction of signal flow between two linked devices. It specifies how data is transmitted from a sender to a receiver. There are three main types of transmission modes:

Simplex: Communication is unidirectional, like a one-way street. One device sends, the other only receives. (e.g., keyboard to computer, radio broadcast).
Half-Duplex: Each device can both send and receive, but not at the same time. It's like a walkie-talkie.
Full-Duplex: Both devices can send and receive simultaneously. It's like a telephone conversation. Quick Tip: - **Simplex:** One way only. - **Half-Duplex:** Two ways, but one at a time. - **Full-Duplex:** Two ways, all the time.


Question 85:

What is array ?

Correct Answer:
View Solution

An array is a linear data structure that stores a collection of elements of the same data type in contiguous memory locations. Each element in the array is identified by at least one index or key. Because the elements are stored side-by-side in memory, arrays offer very efficient random access; any element can be accessed directly using its index. Quick Tip: An array is like a numbered list or a set of mailboxes in a row. You can instantly get to any item if you know its number (index).


Question 86:

Explain Data Anomalies.

Correct Answer:
View Solution

Data anomalies are inconsistencies or data redundancy issues that can occur in a poorly designed database, typically one that has not been properly normalized. They lead to problems with data integrity. There are three main types:

Insertion Anomaly: The inability to add new data to the database because some other data is missing. (e.g., you can't add a new employee who hasn't been assigned to a department yet if the department ID is a required field).
Deletion Anomaly: The unintentional loss of data when another piece of data is deleted. (e.g., deleting the last employee in a department might delete the department itself).
Update Anomaly: Occurs when an update to a single piece of data requires multiple rows to be updated, and failing to update all of them leads to inconsistencies. (e.g., if an employee's address is stored in multiple places, you must update all instances). Quick Tip: Anomalies are problems caused by storing the same information in too many places. Normalization is the process of organizing tables to reduce this redundancy and prevent anomalies.


Question 87:

Describe search engine.

Correct Answer:
View Solution

A search engine is a software system designed to carry out web searches. It searches the World Wide Web in a systematic way for particular information specified in a textual web search query. The search results are generally presented in a line of results, often referred to as search engine results pages (SERPs). The information may be a mix of links to web pages, images, videos, and other types of files. Major search engines like Google and Bing work by crawling the web, indexing the content they find, and then using algorithms to rank and display the most relevant results for a user's query. Quick Tip: A search engine acts like a librarian for the internet. It reads and catalogs billions of pages (indexing) so that when you ask a question (query), it can quickly find the most relevant information for you.


Question 88:

Explain stack.

Correct Answer:
View Solution

A stack is a linear data structure that follows the Last-In, First-Out (LIFO) principle. This means that the last element added to the stack will be the first element to be removed.
The two primary operations on a stack are:

Push: Adds an element to the top of the stack.
Pop: Removes the element from the top of the stack.

Other operations include `Peek` or `Top` (view the top element without removing it) and `isEmpty` (check if the stack is empty). Quick Tip: Think of a stack of plates. You add a new plate to the top (push), and when you need a plate, you take one from the top (pop).


Question 89:

Define DML.

Correct Answer:
View Solution

DML stands for Data Manipulation Language. It is a subset of SQL (Structured Query Language) used for adding, deleting, and modifying data in a database. DML commands are used to manage the data within the tables.
The primary DML commands are:

SELECT: Retrieves data from one or more tables.
INSERT: Adds new rows of data into a table.
UPDATE: Modifies existing data within a table.
DELETE: Removes existing rows from a table. Quick Tip: Remember the difference: DDL (Data Definition Language like `CREATE`, `ALTER`) defines the *structure* of the database, while DML (Data Manipulation Language) manages the *data inside* that structure.


Question 90:

What is a primary key ?

Correct Answer:
View Solution

A primary key is a column or a set of columns in a relational database table that uniquely identifies each row (record) in that table. A primary key must have a unique value for each row and cannot contain null values. It is a fundamental concept for ensuring data integrity and is used to create relationships between different tables. Quick Tip: A primary key is like a Student ID number or a Social Security Number. It's a unique identifier for a specific record that guarantees you won't mix it up with any other record.


Question 91:

What is topology ?

Correct Answer:
View Solution

In the context of computer networks, topology refers to the arrangement or layout of the various elements (links, nodes, etc.) of a computer network. It describes how the computers, printers, and other devices are connected to each other.
There are two types of topology:

Physical Topology: The physical layout of the cables and devices.
Logical Topology: The way data travels through the network.

Common physical topologies include Bus, Ring, Star, Mesh, and Tree. Quick Tip: Topology is the "map" of the network. A star topology looks like a star with a central hub, while a ring topology connects devices in a circle.


Question 92:

Describe the types of Data structure.

Correct Answer:
View Solution

Data structures are ways of organizing and storing data in a computer so that it can be accessed and modified efficiently. They are broadly classified into two main types:


Linear Data Structures:
In linear data structures, elements are arranged in a sequential or linear order. Each element is connected to its previous and next element.

Array: A collection of elements of the same type stored at contiguous memory locations.
Linked List: A collection of nodes where each node contains data and a pointer to the next node. They do not need to be in contiguous memory.
Stack: A linear structure that follows the Last-In, First-Out (LIFO) principle.
Queue: A linear structure that follows the First-In, First-Out (FIFO) principle.


Non-Linear Data Structures:
In non-linear data structures, elements are not arranged in a sequential order. Each element can be connected to one or more other elements, representing a hierarchical relationship.

Tree: A hierarchical structure with a root node and subtrees of children with a parent-child relationship. A binary tree is a common example.
Graph: A collection of vertices (nodes) and edges that connect pairs of vertices. Unlike trees, graphs can have cycles. Quick Tip: Remember: **Linear** is like a list (Array, Stack, Queue). **Non-Linear** is like a map or a family tree (Graph, Tree).


Question 93:

Differentiate between stack and queue data structure.

Correct Answer:
View Solution

The main difference between a stack and a queue is the order in which elements are accessed.

\begin{tabular{|p{0.45\linewidth|p{0.45\linewidth|
\hline
Stack & Queue

\hline
Principle: Follows LIFO (Last-In, First-Out). The last element added is the first one to be removed. & Principle: Follows FIFO (First-In, First-Out). The first element added is the first one to be removed.

\hline
Analogy: A stack of plates. & Analogy: A queue of people waiting in line.

\hline
Operations: `Push` (to insert) and `Pop` (to remove). & Operations: `Enqueue` (to insert) and `Dequeue` (to remove).

\hline
Pointers: Only one pointer, called `top`, which points to the last inserted element. & Pointers: Two pointers, `front` (or `head`) and `rear` (or `tail`), to track the start and end of the queue.

\hline
Applications: Function call management, expression evaluation, undo/redo features. & Applications: CPU scheduling, print job scheduling, data buffers.

\hline
\end{tabular Quick Tip: Stack = LIFO (Last one in is the first one out). Queue = FIFO (First one in is the first one out).


Question 94:

Explain the different types of SQL commands.

Correct Answer:
View Solution

SQL (Structured Query Language) commands are categorized into five main types based on their functionality:


DDL (Data Definition Language): Used to define and manage the structure of the database and its objects (like tables).

\text{CREATE: To create new tables, databases, or other objects.
\text{ALTER: To modify the structure of an existing object.
\text{DROP: To permanently delete an object.
\text{TRUNCATE: To remove all records from a table, but not the table itself.

DML (Data Manipulation Language): Used for managing the data within the schema objects.

\text{SELECT: To retrieve data from the database.
\text{INSERT: To add new data into a table.
\text{UPDATE: To modify existing data.
\text{DELETE: To remove data from a table.

DCL (Data Control Language): Used to control access rights and permissions on the database.

\text{GRANT: To give user access privileges.
\text{REVOKE: To take back permissions from a user.

TCL (Transaction Control Language): Used to manage transactions in the database.

\text{COMMIT: To save the work done in a transaction.
\text{ROLLBACK: To restore the database to the last committed state.
\text{SAVEPOINT: To create points within a transaction to which you can later roll back.

DQL (Data Query Language): While often considered part of DML, some classify it separately. Its sole purpose is to fetch data.

\text{SELECT: Used to query the database. Quick Tip: - **DDL** = Structure - **DML** = Data - **DCL** = Permissions - **TCL** = Transactions


Question 95:

What is the difference between delete and truncate commands ?

Correct Answer:
View Solution

Both DELETE and \text{TRUNCATE are used to remove records from a database table, but they work differently.

\begin{tabular{|p{0.45\linewidth|p{0.45\linewidth|
\hline
DELETE & TRUNCATE

\hline
Command Type: It is a DML (Data Manipulation Language) command. & Command Type: It is a DDL (Data Definition Language) command.

\hline
Filtering: Can remove specific rows using a \text{WHERE clause. If no \text{WHERE clause is used, it removes all rows. & Filtering: Removes all rows from a table. It cannot be used with a \text{WHERE clause.

\hline
Performance: Slower, as it removes rows one by one and records an entry in the transaction log for each deleted row. & Performance: Faster, as it deallocates the data pages used to store the table's data and only records the deallocation in the log.

\hline
Rollback: The operation can be undone using \text{ROLLBACK because each deletion is logged. & Rollback: The operation cannot be rolled back in most database systems as it's a minimally logged operation.

\hline
Triggers: Will fire any \text{DELETE triggers associated with the table. & Triggers: Will not fire any \text{DELETE triggers.

\hline
Identity Reset: Does not reset the table's identity column value. & Identity Reset: Resets the identity column back to its seed value.

\hline
\end{tabular Quick Tip: Use \text{DELETE when you want to remove specific rows or need to be able to undo the change. Use TRUNCATE when you want to quickly empty an entire table and don't need the data back.


Question 96:

Write a program in C++ to generate and display prime number from 1 to 51.

Correct Answer:
View Solution

\begin{lstlisting
#include

int main() {
int n;
long long factorial = 1;

// Prompt user for input
std::cout << "Enter a positive integer: ";
std::cin >> n;

// Check for negative input
if (n < 0) {
std::cout << "Factorial is not defined for negative numbers." << std::endl;
else {
// Calculate factorial
for (int i = 1; i <= n; ++i) {
factorial *= i;

std::cout << "Factorial of " << n << " = " << factorial << std::endl;


return 0;

\end{lstlisting Quick Tip: A key optimization for checking primality is to only test for divisors up to the square root of the number. If a number `n` has a factor larger than its square root, it must also have a corresponding factor smaller than its square root.


Question 97:

Write a program in C++ to accept a number then display how many digits it contains and the sum of its digits.

Correct Answer:
View Solution

\begin{lstlisting
#include

int main(){
int number;
int originalNumber; // To store the original number for display
int digitCount = 0;
int sumOfDigits = 0;

// Prompt the user to enter a number
std::cout << "Enter an integer: ";
std::cin >> number;

// Store the original number as it will be modified
originalNumber = number;

// Handle the case of input being 0
if (number == 0){
digitCount = 1;
else {
// Make the number positive if it's negative
if (number < 0){
number = -number;


// Loop until the number becomes 0
while (number > 0){
// Get the last digit using the modulo operator
int digit = number % 10;

// Add the digit to the sum
sumOfDigits += digit;

// Increment the digit count
digitCount++;

// Remove the last digit by integer division
number = number / 10;



// Display the results
std::cout << "The number " << originalNumber << " contains " << digitCount << " digits." << std::endl;
std::cout << "The sum of its digits is: " << sumOfDigits << std::endl;

return 0;

\end{lstlisting Quick Tip: The modulo operator (`% 10`) is perfect for getting the last digit of a number, and integer division (`/ 10`) is perfect for removing it. Repeating this process in a loop is a classic way to process all digits of a number.

*The article might have information for the previous academic years, please refer the official website of the exam.

Ask your question

Subscribe To Our News Letter

Get Latest Notification Of Colleges, Exams and News

© 2026 Patronum Web Private Limited