DSSSB TGT / PGT · Topic-wise previous year questions
Computer Science Previous Year Questions (page 40)
2444 Computer Science questions asked in DSSSB TGT / PGT previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
In singly linked list, each node of the list consists of ___________.
Adata value and address of next node
BNULL and address of the next node
CNULL and address of the previous node
Ddata value and address of previous node
Show answerHide answer
Correct answer: (A) data value and address of next node
Explanation
Each node of a singly linked list holds the data and a pointer (address) to the next node; the last node's pointer is NULL. A previous-node pointer is used in doubly linked lists.
Which of the following statements is correct about the divide and conquer approach of binary
search technique?
AThe recurrence relation of binary search is written as T(n) = 2T(n/2) + O(1), where n is the number of elements in the array.
BThe worst-case time complexity of binary search is O(log n).
CThe best-case time complexity of binary search is O(log n).
DThe average-case time complexity of binary search is O(n).
Show answerHide answer
Correct answer: (B) The worst-case time complexity of binary search is O(log n).
Explanation
Each step compares with the middle element and discards half the array, so T(n) = T(n/2) + O(1), giving O(log n) in the worst case. The best case is O(1) and the average case is O(log n), and the recurrence has T(n/2) once, not twice.
If A =
[ 1 0 0 ]
[ 0 -1 0 ]
[ 1 0 1 ]
then the matrix for A⁶ is __________.
A[ 6 0 0 ]
[ 0 6 0 ]
[ 6 0 6 ]
B[ 1 0 0 ]
[ 0 -1 0 ]
[ 6 0 1 ]
C[ 1 0 0 ]
[ 0 -1 0 ]
[ 1 0 1 ]
D[ 1 0 0 ]
[ 0 1 0 ]
[ 6 0 1 ]
Show answerHide answer
Correct answer: (D) [ 1 0 0 ]
[ 0 1 0 ]
[ 6 0 1 ]
Explanation
Squaring gives row 3 = [2, 0, 1] and the middle entry (-1)² = 1. In general A^n has row 3 = [n, 0, 1] and middle entry (-1)^n, so A⁶ has row 3 = [6, 0, 1] and middle entry 1.
The magnetic moment of a bar magnet is _____ the magnetic moment of an equivalent
solenoid if the solenoid's magnetic field is _______ that of the bar magnet.
Aequal to ; same as
Bmore than ; same as
Cless than ; same as
Dequal to ; different from
Show answerHide answer
Correct answer: (A) equal to ; same as
Explanation
A long solenoid behaves like a bar magnet. If both produce the same magnetic field, their magnetic moments must be equal.
Which of the following is a disadvantage of singly linked list?
AAccessing an element in a singly linked list requires traversal from the head, making it
slower than arrays.
BDeletion operation at the beginning of the linked list is performed in O(1) time.
CInsertion operation at the beginning of the linked list is performed in O (1) time.
DLinked lists have a variable size.
Show answerHide answer
Correct answer: (A) Accessing an element in a singly linked list requires traversal from the head, making it
slower than arrays.
Explanation
To reach the k-th element in a singly linked list you must traverse from the head, O(n), whereas arrays allow direct access by index. O(1) insertion and deletion at the start and variable size are advantages.
During the financial year 2024-25, the total purchases of ABC Ltd. were ₹1,90,000. If the gross profit of ABC Ltd. was 20% on sales and the closing stock was ₹30,000 more than the opening stock, what was the gross profit earned by ABC Ltd. during the year 2024-25?
A₹35,000.00
B₹52,000.00
C₹25,000.00
D₹40,000.00
Show answerHide answer
Correct answer: (D) ₹40,000.00
Explanation
Cost of goods sold = purchases - increase in stock = 1,90,000 - 30,000 = 1,60,000. With 20% gross profit on sales, COGS is 80% of sales, so sales = 2,00,000 and gross profit = 40,000.
ATo extend the physical memory using secondary storage
BTo provide cache storage
CTo store BIOS settings
DTo increase CPU speed
Show answerHide answer
Correct answer: (A) To extend the physical memory using secondary storage
Explanation
Virtual memory uses part of secondary storage (disk) as an extension of RAM, so programs larger than physical memory can run, with pages swapped in and out as needed.
Which of the following is true about the for loop in C?
AA for loop cannot be nested inside another for loop.
BThe condition in a for loop is optional, and it can result in an infinite loop if omitted.
CA for loop must always have all three components: initialization, condition, and
increment/decrement.
DThe increment/decrement part of the for loop is mandatory.
Show answerHide answer
Correct answer: (B) The condition in a for loop is optional, and it can result in an infinite loop if omitted.
Explanation
All three parts of a for loop are optional. If the condition is omitted, it is treated as always true, e.g. for(;;), giving an infinite loop unless break is used. For loops can also be nested.
On 15 December 2024, a fire occurred in the godown of M Ltd., and the entire stock was destroyed. The value of the stock salvaged was ₹3,00,000. The following transactions took place between 1 October 2024 and 15 December 2024 (Purchases, Sales, Wages, Opening Stock, Gross Profit).
[The figures of this table are not reproduced in the source paper.]
The value of stock lost by fire was ____.
A₹2,55,000
B₹6,30,000
C₹6,75,000
D₹5,92,000
Show answerHide answer
Correct answer: (B) ₹6,30,000
Explanation
Note: the figures of the table (Purchases, Sales, Wages, Opening Stock, Gross Profit) are missing in the source paper. The official answer key marks ₹6,30,000.
Two identical cells of emf = 1.5 V and internal resistance = 0.5 Ω are connected in series. If the current drawn from the cells is 1 A, then the effective terminal potential difference of the cells will be __________.
A1 V
B0.75 V
C2 V
D0.5 V
Show answerHide answer
Correct answer: (C) 2 V
Explanation
In series, total emf = 1.5 + 1.5 = 3 V and total internal resistance = 0.5 + 0.5 = 1 Ω. Terminal voltage V = E - Ir = 3 - 1 x 1 = 2 V.
MC Publications has received rent amounting to ₹2,50,000 during the financial year ending
31st March 2024. Out of this ₹50,000 represents rent relating to next financial year. The rent
account to be credited to the profit and loss account for the year ended 31st March 2024 is
________ and the rent received in advance will be shown as a/an ________.
A₹1,50,000; Liability
B₹2,00,000; Asset
C₹3,00,000; Asset
D₹2,00,000; Liability
Show answerHide answer
Correct answer: (D) ₹2,00,000; Liability
Explanation
Only the rent for the current year is income: 2,50,000 - 50,000 = 2,00,000 goes to the P&L account. Rent received in advance is unearned income, a current liability in the balance sheet.
Which of the following is NOT a tertiary business activity?
ATransportation
BWarehousing
CInsurance
DManufacturing
Show answerHide answer
Correct answer: (D) Manufacturing
Explanation
Manufacturing is a secondary (industrial) activity because it converts raw materials into goods. Transport, warehousing and insurance are tertiary activities (aids to trade/services).
The control unit directs the instruction cycle: it fetches each instruction, decodes it and generates the control signals that carry out its execution.
Which of the following is a key design goal of an Instruction Set Architecture?
AMinimizing the transistor count
BEnsuring only complex instructions are supported
CMaximizing the instruction decode time
DBalancing simplicity and performance for ease of programming and efficiency
Show answerHide answer
Correct answer: (D) Balancing simplicity and performance for ease of programming and efficiency
Explanation
An ISA is designed to balance simplicity (easy to program and to implement in hardware) against performance and efficiency. Maximising decode time or allowing only complex instructions are not goals.
Which of the following will terminate the loop immediately in C?
AWhen a break statement is encountered
BWhen the loop variable reaches a certain value
CWhen a continue statement is encountered
DWhen the loop condition is not given
Show answerHide answer
Correct answer: (A) When a break statement is encountered
Explanation
break exits the enclosing loop immediately, regardless of the condition. continue only skips the rest of the current iteration and goes on with the next one.
What will be the output of the following C program?
#include <stdio.h>
int main()
{
int a[5];
for (int i = 0; i < 5; i++)
{
a[i] = i * i - 2 * i + 1;
}
for (int i = 0; i < 5; i++)
{
printf("%d ", a[i]);
}
return 0;
}
A1 0 2 4 9
B1 0 1 4 9
C1 1 2 4 9
D1 2 3 4 9
Show answerHide answer
Correct answer: (B) 1 0 1 4 9
Explanation
i*i - 2*i + 1 = (i - 1)², so for i = 0 to 4 the values are 1, 0, 1, 4, 9.
Which of the following options is the particular solution of the differential equation y'' − 6y' + 9y = 2e^(3t)?
Ae^(3t) / 2
Bt²e^(3t)
Ce^(3t)
De^(3t) / 9
Show answerHide answer
Correct answer: (B) t²e^(3t)
Explanation
The auxiliary equation (m - 3)² = 0 has 3 as a double root, so try At²e^(3t). Substituting gives 2A = 2, so A = 1 and the particular solution is t²e^(3t).
Eighty eight residents of a city, who were interviewed in a city are classified as male or female
and also as drinkers or non-drinkers of tea. For testing association between sex and drinking
of tea, the test statistic follows:
At distribution with 1 degree of freedom
BChi Square distribution with 2 degrees of freedom
CNormal distribution
DChi square distribution with 1 degree of freedom
Show answerHide answer
Correct answer: (D) Chi square distribution with 1 degree of freedom
Explanation
A 2 x 2 contingency table (male/female vs drinker/non-drinker) is tested with chi-square, with (2 - 1)(2 - 1) = 1 degree of freedom.
Which of the following statement is correct for a business organisation?
AResponsibility leads to decentralisation
BAuthority leads to decentralisation
CDelegation leads to decentralisation
DCentralisation leads to autonomy
Show answerHide answer
Correct answer: (C) Delegation leads to decentralisation
Explanation
Decentralisation is the systematic delegation of authority to all levels of management, so delegation leads to decentralisation. Centralisation keeps authority at the top and reduces autonomy.
Select an appropriate ROM type from the options, where data can be erased or destroyed
using ultraviolet light.
AEEPROM
BFlash ROM
CEPROM
DPROM
Show answerHide answer
Correct answer: (C) EPROM
Explanation
EPROM (Erasable PROM) is erased by exposing its quartz window to ultraviolet light. EEPROM and flash are erased electrically, and PROM cannot be erased.
What does the term 'bootstrapping' refer to in the context of starting a business?
ARaising funds through venture capitalists
BSelf-funding the business using personal resources
CObtaining bank loans for initial capital
DCrowdfunding through online platforms
Show answerHide answer
Correct answer: (B) Self-funding the business using personal resources
Explanation
Bootstrapping means starting and growing a business with the founder's own savings and revenue, without external capital such as venture capital or loans.
_________ is a methodical approach. It suggests a logical and well-organised sequence of actions. It follows more steps.
ATeaching strategy
BTeaching method
CTeaching technique
DTeaching approach
Show answerHide answer
Correct answer: (D) Teaching approach
Explanation
As keyed, a teaching approach is the broad, methodical plan that sets out a logical, well-organised sequence of actions for teaching. Methods, techniques and strategies are narrower ways of carrying it out.
Aesthetic education (art, music, literature, nature) develops sensitivity and sensory responsiveness to beauty, feelings and expression, rather than recall or logical reasoning.
Gender inequality refers to which of the following?
ASocial and economic disparities between genders
BBiological differences only
CDifferences in hairstyles
DUniform distribution of resources
Show answerHide answer
Correct answer: (A) Social and economic disparities between genders
Explanation
Gender inequality means unequal treatment and social, economic and political disparities between genders in opportunities, resources and rights, not just biological differences.
What is the core principle of the multilingual approach in early education?
APrioritising grammar over communication
BReplacing mother tongue with the target language quickly
CWelcoming the child’s language and using it to build understanding
DTeaching only in the national language
Show answerHide answer
Correct answer: (C) Welcoming the child’s language and using it to build understanding
Explanation
The multilingual approach treats the child's home language as a resource: teachers welcome it and use it as a bridge to new concepts and to other languages, as NEP 2020 and NCF advise.
In school, a 'subject' differs from a 'discipline' because it ____________.
Ais an external field of research
Bis more intensively organised
Cis a philosophical field
Dis the branch of a discipline taught in the classroom
Show answerHide answer
Correct answer: (D) is the branch of a discipline taught in the classroom
Explanation
A school subject is a part of an academic discipline selected and organised for classroom teaching. A discipline is a wider field of knowledge and research.
Which of the following is NOT one of the five steps of Herbartian lesson planning?
AAssociation
BPresentation
CApplication
DEvaluation
Show answerHide answer
Correct answer: (D) Evaluation
Explanation
Herbart's five formal steps are preparation, presentation, association (comparison), generalisation and application. Evaluation (recapitulation) was added later, not part of the original five.
Which law legally mandates the inclusion of children with disabilities into mainstream schools
in India?
ARPwD Act, 2016
BNational Curriculum Framework, 2005
CRTI Act, 2009
DNEP, 2020
Show answerHide answer
Correct answer: (A) RPwD Act, 2016
Explanation
The Rights of Persons with Disabilities Act, 2016 makes inclusive education a legal duty, requiring schools to admit children with disabilities and provide reasonable accommodation. NCF and NEP are policy documents, not laws.
Diagnostic assessment mainly helps in which of the following?
AGrading performance
BStandardising content
CPromoting learners
DIdentifying misconceptions
Show answerHide answer
Correct answer: (D) Identifying misconceptions
Explanation
Diagnostic assessment identifies learners' learning gaps, difficulties and misconceptions, so that remedial teaching can be planned. Grading is the job of summative assessment.
You are designing a curriculum for vocational education. To ensure learners can transfer skills
to actual work settings, which principle should you emphasise most?
APrinciple of activity and practicality
BPrinciple of articulation
CPrinciple of recency
DPrinciple of economy
Show answerHide answer
Correct answer: (A) Principle of activity and practicality
Explanation
Vocational skills transfer to real workplaces when learners practise them through hands-on, practical activities, so the principle of activity and practicality matters most.
Which of the following identifies, controls, audits and reports modifications that invariably occur while software is being developed and after it has been released to a customer?
Which of the following statements is/are true with reference to java servlets?
(i) A Servlet is a Java program that runs without a web server.
(ii) It receives the requests and responds to them using related protocols (usually HTTP).
AOnly (i)
BBoth (i) and (ii)
CNeither (i) nor (ii)
DOnly (ii)
Show answerHide answer
Correct answer: (D) Only (ii)
Explanation
Only (ii) is true: a servlet receives and answers requests, usually over HTTP. It runs inside a web server or servlet container, so (i) is false.
How to use these DSSSB TGT / PGT Computer Science questions
Every question here was asked in a real DSSSB TGT / PGT paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full DSSSB TGT / PGT papers as timed tests to check your speed under exam conditions.