First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Fundamentals of Computers and Number Systems
In the Tamil Nadu Higher Secondary Computer Science syllabus, the physical components of a computer such as the processor, memory chips and hard disk are together known by which term?
- Hardware Correct answer.
- Firmware
- Software
- Malware
Explanation
Hardware refers to the tangible, physical parts of a computer system that can be seen and touched, including the CPU, RAM modules, motherboard and storage drives. Software, by contrast, is the set of instructions that directs this physical equipment.
Question 2Fundamentals of Computers and Number Systems
Which unit of the CPU performs arithmetic operations such as addition and subtraction and also carries out logical comparisons?
- Memory Unit
- Arithmetic Logic Unit Correct answer.
- Control Unit
- Input Unit
Explanation
The Arithmetic Logic Unit (ALU) is the part of the processor where arithmetic operations like addition and logical operations like comparison are actually executed. The control unit only directs and coordinates; it does not perform the calculation itself.
Question 3Fundamentals of Computers and Number Systems
A computer is described as a 'stored program' machine. Which feature of the von Neumann design does this phrase directly describe?
- Input devices convert analog signals into digital form before processing
- The processor contains separate caches for data and for instructions
- Data and instructions share a single memory and are fetched in the same way Correct answer.
- Output is produced only after the entire program has finished running
Explanation
In the stored program concept, both the program instructions and the data are kept in the same main memory, and the CPU fetches each instruction from memory exactly as it fetches data. This is the defining feature of the von Neumann architecture.
Question 4Fundamentals of Computers and Number Systems
Which generation of computers is characterised by the use of integrated circuits, in which many transistors are fabricated on a single silicon chip?
- First generation
- Third generation Correct answer.
- Second generation
- Fourth generation
Explanation
The third generation introduced integrated circuits, replacing individual transistors with multiple components built on one chip. This made computers smaller, faster and more reliable than the earlier transistor-based second generation.
Question 5Fundamentals of Computers and Number Systems
Which of the following is an example of system software rather than application software?
- A photo editing package
- A spreadsheet program used for payroll
- An operating system such as Linux Correct answer.
- A web browser installed by the user
Explanation
System software manages the hardware and provides a platform on which other programs run; an operating system is the classic example. Application software is written to let the user perform a specific task.
Question 6Fundamentals of Computers and Number Systems
What is the decimal value of the binary number 1101?
- 13 Correct answer.
- 11
- 14
- 12
Explanation
Each binary digit is multiplied by its place value: 1×8 + 1×4 + 0×2 + 1×1 = 13. The zero in the twos place contributes nothing, so the total is thirteen.
Question 7Fundamentals of Computers and Number Systems
The decimal number 45 is written in binary as which of the following?
- 110101
- 101101 Correct answer.
- 101011
- 100101
Explanation
Repeated division by two gives remainders 1, 0, 1, 1, 0, 1 read upwards, giving 101101. Checking the place values: 32 + 8 + 4 + 1 = 45, which confirms the result.
Question 8Fundamentals of Computers and Number Systems
What is the hexadecimal equivalent of the binary number 10101111?
- BF
- AF Correct answer.
- 9F
- A9
Explanation
Group the bits in fours from the right: 1010 and 1111. The group 1010 is A and 1111 is F, so the hexadecimal value is AF.
Question 9Fundamentals of Computers and Number Systems
Which of the following is the octal representation of the decimal number 100?
- 144 Correct answer.
- 124
- 64
- 104
Explanation
Dividing 100 by 8 gives quotient 12 and remainder 4; dividing 12 by 8 gives quotient 1 and remainder 4; the final quotient is 1. Reading remainders upward gives 144.
Question 10Fundamentals of Computers and Number Systems
How many distinct values can be represented with a 6-bit binary number?
- 32
- 64 Correct answer.
- 63
- 12
Explanation
With n bits the number of distinct patterns is 2 raised to n, so 2^6 = 64 values, ranging from 0 to 63 when unsigned. The largest value is 63, but the count of patterns is 64.
Question 11Fundamentals of Computers and Number Systems
Which binary operation is used to clear selected bits of a register to zero while leaving the other bits unchanged?
- OR with a mask of zeros in those positions
- NOT applied to the whole register
- AND with a mask of zeros in those positions Correct answer.
- XOR with an all-ones pattern
Explanation
ANDing any bit with 0 always yields 0, and ANDing with 1 leaves the bit unchanged, so a mask with zeros in the target positions clears exactly those bits. This is the standard masking technique.
Question 12Fundamentals of Computers and Number Systems
What is the 2's complement representation of the decimal number −5 in an 8-bit register?
- 11111010
- 11111011 Correct answer.
- 10000101
- 00000101
Explanation
Write +5 as 00000101, invert the bits to get 11111010, then add 1 to obtain 11111011. The leading 1 marks the number as negative, and its magnitude is five.
Question 13Fundamentals of Computers and Number Systems
A computer uses 1's complement arithmetic. What is the result of adding 0101 and 1010?
- 0000
- 0101
- 1111 with a carry that must be added back
- 1111 Correct answer.
Explanation
Adding bit by bit gives 1111 with no carry out of the sign position, so the sum is the 1's complement pattern 1111. In 1's complement this pattern represents negative zero, and no end-around carry arises here.
Question 14Fundamentals of Computers and Number Systems
In the BCD representation, how is the decimal number 27 stored?
- 00011011
- 01000111
- 00100111 Correct answer.
- 00100110
Explanation
In packed BCD each decimal digit is coded separately in four bits, so 2 becomes 0010 and 7 becomes 0111, giving 00100111. This differs from the pure binary form of 27.
Question 15Fundamentals of Computers and Number Systems
Which code is a weighted, self-complementing decimal code in which the weights of the four bits are 2, 4, 2 and 1?
- Excess-3 code
- ASCII
- Gray code
- 2421 code Correct answer.
Explanation
The 2421 code assigns the weights 2, 4, 2 and 1 to its four bit positions and is self-complementing, so the 9's complement of a digit is obtained by inverting its bits. Excess-3 is self-complementing but is not a weighted code of this kind.
Question 16Fundamentals of Computers and Number Systems
What is the Gray code equivalent of the binary number 1011?
- 1101
- 0110
- 1110 Correct answer.
- 1010
Explanation
The most significant Gray bit equals the most significant binary bit, and each further Gray bit is the XOR of adjacent binary bits. Thus 1, then 1⊕0=1, 0⊕1=1, 1⊕1=0, giving 1110.
Question 17Fundamentals of Computers and Number Systems
How many bits are required to encode the 26 uppercase letters of the English alphabet in a fixed-length binary code?
- 8 bits
- 6 bits
- 4 bits
- 5 bits Correct answer.
Explanation
Four bits give only 16 patterns, which is insufficient for 26 letters, whereas five bits give 32 patterns, enough to assign a unique code to each letter. Six bits would also work but uses more bits than necessary.
Question 18Fundamentals of Computers and Number Systems
The ASCII code of the character 'A' is 65. What is the ASCII code of the character 'E'?
- 68
- 69 Correct answer.
- 70
- 67
Explanation
Uppercase letters occupy consecutive ASCII positions, so each step forward in the alphabet adds one to the code. Counting A=65, B=66, C=67, D=68 and E=69 gives the answer.
Question 19Fundamentals of Computers and Number Systems
Which of the following best describes the function of the control unit during the fetch-decode-execute cycle?
- It generates timing and control signals that direct the other units Correct answer.
- It converts user input into binary form
- It performs the arithmetic and logical operations requested by instructions
- It stores the program permanently on the hard disk
Explanation
The control unit fetches each instruction, decodes it and then issues the control signals that tell the ALU, registers and memory exactly what to do at each step. It coordinates the machine without performing the computation itself.
Question 20Fundamentals of Computers and Number Systems
Which memory is volatile, meaning its contents are lost when power is switched off?
- RAM Correct answer.
- Flash drive
- ROM
- Hard disk
Explanation
RAM is read-write main memory that holds programs and data while the computer is running, and it loses its contents when power is removed. ROM and secondary storage devices retain their contents without power.
Question 21Fundamentals of Computers and Number Systems
What is the main advantage of cache memory in a computer system?
- It replaces the need for main memory entirely
- It stores the operating system permanently
- It provides large permanent storage at low cost
- It reduces the average time the CPU waits for data from main memory Correct answer.
Explanation
Cache is small, very fast memory placed close to the CPU that holds recently used instructions and data. Because the CPU can read it far faster than main memory, the average access time and waiting are reduced.
Question 22Fundamentals of Computers and Number Systems
Which of the following correctly lists the units of memory in increasing order of size?
- Megabyte, Kilobyte, Gigabyte, Terabyte
- Kilobyte, Megabyte, Gigabyte, Terabyte Correct answer.
- Kilobyte, Gigabyte, Megabyte, Terabyte
- Terabyte, Gigabyte, Megabyte, Kilobyte
Explanation
Memory and storage units scale upward by powers of 1024 in the conventional scheme: a kilobyte is smaller than a megabyte, which is smaller than a gigabyte, which is smaller than a terabyte. The given order follows this increasing sequence.
Question 23Fundamentals of Computers and Number Systems
A student writes the decimal fraction 0.5 as a binary fraction. Which representation is correct?
- 0.11
- 0.1 Correct answer.
- 0.001
- 0.01
Explanation
The first fractional binary place has weight 1/2, so a single 1 there represents exactly 0.5. Multiplying the fraction by 2 repeatedly gives the digit 1 followed by zeros.
Question 24Fundamentals of Computers and Number Systems
Which statement correctly distinguishes a compiler from an interpreter?
- A compiler is system software, while an interpreter is application software
- A compiler translates the whole program at once, while an interpreter translates and executes it line by line Correct answer.
- A compiler runs the source code directly, while an interpreter produces an object file
- A compiler works only with assembly language, while an interpreter works only with machine code
Explanation
A compiler scans the entire source program and produces an object or executable file before execution, whereas an interpreter translates and executes one statement at a time. This difference affects error reporting and execution speed.
Question 25Data Structures: Lists, Stacks and Queues
In a singly linked list, which field of a node stores the address of the following node?
- The link (next) field Correct answer.
- The head pointer of the list
- The data field
- The index field
Explanation
A node in a singly linked list has two parts: a data part holding the value and a link part holding the address of the next node. The head pointer belongs to the list as a whole, not to a node, and nodes have no index field because access is sequential.
Question 26Data Structures: Lists, Stacks and Queues
A stack is described as a LIFO structure. Which operation removes the most recently inserted element?
- push
- enqueue
- peek
- pop Correct answer.
Explanation
In a LIFO (Last In First Out) stack, insertion is done by push and removal by pop, so pop always removes the element that was pushed most recently. Peek only reads the top element without removing it.
Question 27Data Structures: Lists, Stacks and Queues
In a queue, at which end is a new element inserted and from which end is an element deleted?
- Inserted and deleted at the rear
- Inserted and deleted at the front
- Inserted at the rear, deleted at the front Correct answer.
- Inserted at the front, deleted at the rear
Explanation
A queue is FIFO (First In First Out): the enqueue operation adds at the rear and the dequeue operation removes from the front. This keeps the element that arrived earliest at the head of the line.
Question 28Data Structures: Lists, Stacks and Queues
In Python, which list method appends an element at the end of an existing list?
- insert()
- add()
- extend()
- append() Correct answer.
Explanation
The append() method adds a single object to the end of a Python list. insert() needs a position argument, extend() adds all items of an iterable, and add() is a set method, not a list method.
Question 29Data Structures: Lists, Stacks and Queues
What does the Python expression len([10, 20, 30, 40]) return?
- 5
- 4 Correct answer.
- 3
- 10
Explanation
The len() function returns the number of elements in the list. The list contains four elements, 10, 20, 30 and 40, so the result is 4.
Question 30Data Structures: Lists, Stacks and Queues
Which condition correctly identifies an empty stack stored in a list named s?
- len(s) == 0 Correct answer.
- len(s) == 1
- s[0] == 0
- s == None
Explanation
A stack implemented with a list is empty when the list holds no elements, which is tested by len(s) == 0 or simply not s. Reading s[0] on an empty list would raise an IndexError.
Question 31Data Structures: Lists, Stacks and Queues
In a circular queue of capacity n with front and rear indices, what is the main advantage over a simple linear array queue?
- It reuses freed front positions instead of wasting them Correct answer.
- It stores elements in sorted order automatically
- It removes the need for a front index
- It allows deletion from both ends
Explanation
In a linear array queue, positions freed by dequeue at the front cannot be reused, so the queue drifts towards the end of the array. A circular queue wraps rear and front around using modulo arithmetic, reusing those freed slots.
Question 32Data Structures: Lists, Stacks and Queues
Which of the following is a real-life situation that behaves like a queue?
- A pile of plates where the top plate is taken first
- Undo operation in a text editor
- Students standing in a line at a ticket counter Correct answer.
- Nested brackets checked by a compiler
Explanation
A queue serves whoever arrived first, exactly like a line of students at a counter where the first person is served first. Plates on a pile, bracket matching and undo all remove the most recent item, which is stack behaviour.
Question 33Data Structures: Lists, Stacks and Queues
A list L contains [5, 8, 12, 20]. What is the value of L[1] + L[-1]?
- 25
- 13
- 17
- 28 Correct answer.
Explanation
In Python, L[1] is the second element, 8, and L[-1] is the last element, 20. Adding them gives 28, since negative indices count from the end of the list.
Question 34Data Structures: Lists, Stacks and Queues
What is printed by the following code?
s = []
s.append(1)
s.append(2)
s.append(3)
s.pop()
print(s)
- [3]
- [2, 3]
- [1, 2, 3]
- [1, 2] Correct answer.
Explanation
Three values are pushed in the order 1, 2, 3, and pop() removes the top element, which is 3. The remaining list is [1, 2], showing the LIFO behaviour of the stack.
Question 35Data Structures: Lists, Stacks and Queues
Consider a queue implemented with a Python list where enqueue uses append() and dequeue uses pop(0). Why can this be inefficient for a long queue?
- pop(0) must shift all remaining elements one position left Correct answer.
- append() takes time proportional to the queue length
- Python lists cannot store more than 100 elements
- The rear index overflows after each enqueue
Explanation
Removing the element at index 0 forces Python to shift every remaining element one place to the left, which costs time proportional to the number of elements. Using collections.deque, which supports fast removal from both ends, avoids this cost.
Question 36Data Structures: Lists, Stacks and Queues
A stack contains the elements 4 (bottom), 7, 9 and 2 (top). What is the state of the stack after push(6) followed by two pop() operations?
- [4, 7] Correct answer.
- [4, 7, 9]
- [4, 7, 6]
- [4, 7, 9, 6]
Explanation
push(6) makes 6 the top, giving 4, 7, 9, 2, 6. The first pop removes 6 and the second removes 2, leaving 4, 7 with 7 on top.
Question 37Data Structures: Lists, Stacks and Queues
In a linked list, which operation requires modification of the head pointer when the list is non-empty?
- Reading the data of the last node
- Traversing the list to print elements
- Inserting a new node at the front Correct answer.
- Searching for a value in the middle
Explanation
Inserting at the front makes the new node the first node, so the head pointer must be updated to its address. Traversal, reading the last node and searching only follow existing links and change no pointer.
Question 38Data Structures: Lists, Stacks and Queues
Which Python statement correctly removes and returns the last element of a list named stack?
- stack.pop() Correct answer.
- del stack
- stack.delete()
- stack.remove()
Explanation
pop() with no argument removes the last element of the list and returns it, which matches stack removal. remove() needs a value argument and deletes by value, while del stack deletes the whole list object.
Question 39Data Structures: Lists, Stacks and Queues
A circular queue has capacity 5 and currently front = 2 and rear = 4 with three elements stored. After one enqueue, what are the new rear value and element count?
- rear = 0, count = 3
- rear = 0, count = 4 Correct answer.
- rear = 5, count = 4
- rear = 5, count = 3
Explanation
The next rear position is computed as (rear + 1) % capacity, so (4 + 1) % 5 gives 0, wrapping around to the start of the array. The enqueue adds one element, so the count rises from three to four.
Question 40Data Structures: Lists, Stacks and Queues
Which application is best served by a stack rather than a queue?
- Reversing the characters of a string Correct answer.
- Handling CPU processes in arrival order
- Serving customers on a first-come basis
- Printing documents in the order they were submitted
Explanation
Reversing a string means pushing each character and then popping them, so the last character pushed comes out first, which is exactly stack behaviour. The other three situations all require first-in-first-out order and therefore use a queue.
Question 41Data Structures: Lists, Stacks and Queues
In a singly linked list, what does the link field of the last node contain?
- A null reference marking the end Correct answer.
- The address of the head node
- The address of the previous node
- The total number of nodes
Explanation
The last node has no successor, so its link field holds a null reference (None in Python) to signal the end of the list. This null link is what stops a traversal loop.
Question 42Data Structures: Lists, Stacks and Queues
What does the following Python code print?
q = ["a", "b", "c"]
q.append("d")
print(q.pop(0), q)
- a ['b', 'c', 'd'] Correct answer.
- d ['b', 'c']
- a ['b', 'c']
- d ['a', 'b', 'c']
Explanation
append("d") adds d at the rear, giving ['a', 'b', 'c', 'd']. Then pop(0) removes the front element 'a' and returns it, so the printed value is a and the remaining list is ['b', 'c', 'd'].
Question 43Data Structures: Lists, Stacks and Queues
A list marks = [45, 78, 90, 33] is given. Which statement replaces the value 78 with 80?
- marks[1] = 80 Correct answer.
- marks.insert(80)
- marks.remove(78) = 80
- marks.append(80)
Explanation
The value 78 is at index 1, and assignment to an existing index replaces the element stored there. append and insert add new elements instead of replacing, and remove cannot appear on the left of an assignment.
Question 44Data Structures: Lists, Stacks and Queues
Which statement about the time needed to access the k-th element in an array-based list versus a singly linked list is correct?
- The array gives direct access in constant time, while the linked list needs k steps Correct answer.
- The linked list is faster because nodes are linked
- Both need the same constant time
- Both need time proportional to k
Explanation
An array stores elements in consecutive memory, so the address of the k-th element is computed directly in constant time. A singly linked list has no such formula, so it must follow k links from the head, which takes time proportional to k.
Question 45Data Structures: Lists, Stacks and Queues
A queue is implemented with a list and the operations are enqueue(1), enqueue(2), dequeue(), enqueue(3), dequeue(). What remains in the queue?
- [2, 3]
- [3] Correct answer.
- [1, 3]
- [1, 2]
Explanation
After enqueue(1) and enqueue(2) the queue is [1, 2]; the first dequeue removes 1, leaving [2]. enqueue(3) gives [2, 3] and the second dequeue removes 2, so only [3] remains.
Question 46Data Structures: Lists, Stacks and Queues
Which expression correctly tests whether a circular queue with capacity n is full, given front and rear indices and a count variable?
- count == n Correct answer.
- front == rear
- rear == n
- front == 0
Explanation
Keeping an explicit count makes the full test simply count == n, which avoids the ambiguity of front == rear, a condition that also holds when the queue is empty. Comparing rear with n fails because indices wrap around.
Question 47Data Structures: Lists, Stacks and Queues
What is the final content of the list after this code runs?
lst = [1, 2, 3, 4, 5]
del lst[1:3]
lst.insert(1, 9)
- [1, 2, 9, 4, 5]
- [9, 1, 4, 5]
- [1, 9, 4, 5] Correct answer.
- [1, 9, 3, 4, 5]
Explanation
The slice lst[1:3] covers indices 1 and 2, that is the values 2 and 3, so deleting it leaves [1, 4, 5]. Then insert(1, 9) places 9 at index 1, giving [1, 9, 4, 5].
Question 48Data Structures: Lists, Stacks and Queues
A stack is used to check whether the brackets in the string "([{}])" are balanced. What is the maximum number of elements held by the stack during the scan?
- 3 Correct answer.
- 6
- 4
- 2
Explanation
Each opening bracket is pushed and each closing bracket pops the matching top, so the stack depth equals the number of open brackets not yet closed. The deepest point is after reading "([{", when three opening brackets are pending, so the maximum depth is 3.
Question 49Data Structures: Lists, Stacks and Queues
A singly linked list is to be reversed by changing links. Which pointer updates are required at each node while traversing the list?
- Swap the data fields of the first and last nodes only
- Point the current node's link to its previous node, then advance previous and current Correct answer.
- Point the current node's link to its next node twice
- Point the head to the last node and stop
Explanation
Reversal requires three pointers: previous, current and next. At each step the current node's link is redirected to the previous node, then previous moves to current and current moves to the saved next node, and finally the head is set to the old last node.
Question 50Data Structures: Lists, Stacks and Queues
In a list-based stack implementation, which pair of Python list methods gives the standard push and pop operations with O(1) time each?
- insert(0, x) for push and pop() for pop
- append() for push and pop() for pop Correct answer.
- append() for push and pop(0) for pop
- insert(0, x) for push and pop(0) for pop
Explanation
A stack follows the LIFO principle, so the newest element must be the one removed first. Python's append() adds at the end of the list and pop() with no argument removes the last element, so both act at the same end and each takes constant time. The other pairings act at opposite ends or shift every remaining element.