DSSSB TGT / PGT · Topic-wise previous year questions
Computer Science Previous Year Questions (page 31)
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.
Q1502DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following is/are aspect(s) of software evolution?
I. Software Architecture Aspect
II. Programming Language Aspect
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
Software evolution covers changes in software architecture (structure and design of systems over time) as well as in programming languages and paradigms used to build them, so both are aspects of evolution.
Q1503DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following are the functions performed by operating system?
I. Process Management
II. Memory Management
III. Security
AI and II
BII and III
CI and III
DI, II, and III
Show answerHide answer
Correct answer: (D) I, II, and III
Explanation
An operating system manages processes (creation, scheduling), memory (allocation, paging) and security/protection of resources, so all three are OS functions.
Q1504DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
What is the length of an array when its first index is denoted by i and last index is denoted by j?
ALength of an array = i + j
BLength of an array = j − i
CLength of an array = j − i + 1
DLength of an array = j − i − 1
Show answerHide answer
Correct answer: (C) Length of an array = j − i + 1
Explanation
Indices i, i+1, ..., j contain j − i + 1 elements. For example, indices 0 to 9 give 10 elements.
Q1505DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
What is the condition for binary search of be unsuccessful where Beg is the beginning and End is ending location of sorted array?
AEnd > Beg
BEnd == Beg
CEnd < Beg
DEnd != Beg
Show answerHide answer
Correct answer: (C) End < Beg
Explanation
Binary search keeps narrowing Beg..End; when Beg passes End (End < Beg) the search range is empty, so the element is not present.
Q1506DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which statement(s) is/are true about formation of identifier in C?
I. It consist of alphabets, digits and underscore.
II. An identifier can start with an underscore.
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
A C identifier may contain letters, digits and underscores, and may begin with a letter or an underscore (but not a digit). Both statements are true.
Q1507DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
In C++ a wide-character constant begins with the letter ________.
AW
BC
CL
DS
Show answerHide answer
Correct answer: (C) L
Explanation
A wide-character literal is written with the prefix L, for example L'a', and has type wchar_t.
Q1508DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Arrange the following in ascending order of their average case complexity.
Selection-sort, Quick-sort, Linear search, Binary search
AQuick-Sort, Selection-sort, Binary search, Linear search
CBinary search, Linear search, Quick-sort, Selection-sort
DSelection-sort, Quick-sort, Linear search, Binary search
Show answerHide answer
Correct answer: (C) Binary search, Linear search, Quick-sort, Selection-sort
Explanation
Average cases: binary search O(log n) < linear search O(n) < quick sort O(n log n) < selection sort O(n²).
Q1509DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
What is the output of the code written in C?
void main()
{
printf("%d", 7%-3);
printf("%d", -7%3);
}
A1 −1
B−1 −1
C−1 1
D1 1
Show answerHide answer
Correct answer: (A) 1 −1
Explanation
In C the result of % takes the sign of the dividend: 7 % −3 = 1 and −7 % 3 = −1. The two printf calls print 1 and −1.
Q1510DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following statement(s) is/are true about pre-processor in C/C++?
I. To replace each # include directive with the contents of the designated file.
II. To replace each escape sequence with designated character.
III. To process macro definitions and expand macro calls.
AI and II
BII and III
COnly I
DI, II and III
Show answerHide answer
Correct answer: (D) I, II and III
Explanation
The preprocessor stage replaces #include lines with the file contents and expands macros; the key also counts handling of escape sequences in this preprocessing step, so all three are taken as correct.
Q1511DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
What is the equivalent infix expression of the following postfix expression?
M, N, O, +, *, P, /, Q, R, S, T, /, +, *, −
Scanning left to right: M N O + * gives M*(N+O); then P / gives (M*(N+O))/P; Q R S T / + * gives Q*(R+S/T); the final − joins them: ((M*(N+O))/P) − (Q*(R+(S/T))).
Q1512DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
While inserting the elements 71, 56, 48, 96, 76, 82, 98 in an empty binary search tree in the sequence shown, which element will come in the lowest level?
A96
B98
C71
D82
Show answerHide answer
Correct answer: (D) 82
Explanation
71 is the root; 56 and 48 go left; 96 goes right; 76 becomes the left child of 96; 82 goes right of 76 (level 4); 98 is the right child of 96. So 82 is at the deepest level.
Q1513DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following statement(s) is/are correct?
I. (4052)₇ = (1409)₁₀
II. (1715)₁₀ = (BAB)₁₂
Q1514DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
________ protocol is used for electronic data interchange. (Standard developed for the electronic exchange of machine-readable information between businesses.)
AX.12
BX.75
CXON
DXL2.5
Show answerHide answer
Correct answer: (A) X.12
Explanation
ANSI X12 is the standard for electronic data interchange (EDI) of business documents. X.75 links packet networks, and XON is a flow-control character.
Q1515DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
EBCDIC is the Extended Binary Coded Decimal Interchange Code, an 8-bit character code used on IBM mainframes.
Q1516DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Write the binary code for EXAM in ASCII-7. (Decimal code of A is 65)
A1001101101100010000011001101
B1000101101100010000011001101
C1011000100000110110001000001
D1000001101100010011011011000
Show answerHide answer
Correct answer: (B) 1000101101100010000011001101
Explanation
E = 69 = 1000101, X = 88 = 1011000, A = 65 = 1000001, M = 77 = 1001101. Joining the four 7-bit codes gives 1000101 1011000 1000001 1001101, which is option B.
Q1517DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
________ converts a source code to object code.
ACompiler
BLinker
CEditor
DLoader
Show answerHide answer
Correct answer: (A) Compiler
Explanation
A compiler translates the whole source program into object (machine) code. A linker combines object files, and a loader places the program in memory.
Q1518DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Method of subtraction by an additive approach is known as ________ subtraction.
AInverse
BComplementary
CMultiplicative
DAssociate
Show answerHide answer
Correct answer: (B) Complementary
Explanation
Complementary subtraction does subtraction by adding the complement (1's, 2's, 9's or 10's) of the subtrahend, so subtraction becomes addition.
Q1519DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
3 resistors of 3 ohm each connected in series. What is the mean values of resistors?
A1 ohm
B9 ohm
C6 ohm
D18 ohm
Show answerHide answer
Correct answer: (B) 9 ohm
Explanation
In series the resistances add: 3 + 3 + 3 = 9 ohm. The keyed value is this equivalent resistance.
Q1520DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which gate is represented by the following truth table?
A | B | Output
0 | 0 | 0
0 | 1 | 0
1 | 0 | 0
1 | 1 | 1
AOR
BAND
CNAND
DNOR
Show answerHide answer
Correct answer: (B) AND
Explanation
The output is 1 only when both inputs are 1, which is the AND function.
Q1521DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Simplify the following Boolean expression.
E(E + F) + DE + D(E + F)
AE + DF
BF + DE
CD + EF
DD + E + F
Show answerHide answer
Correct answer: (A) E + DF
Explanation
E(E + F) = E, and E absorbs DE. D(E + F) = DE + DF, and DE is again absorbed by E. What remains is E + DF.
Q1522DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following represents the borrow in a half subtraction?
AAB
BAB' (A B-bar)
CA'B (A-bar B)
DA'B' (A-bar B-bar)
Show answerHide answer
Correct answer: (C) A'B (A-bar B)
Explanation
A half subtractor computes A − B: difference = A ⊕ B and borrow = A'B, since a borrow is needed only when A = 0 and B = 1.
Q1523DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
A monostable multivibrator has which of the following state(s)?
I. One stable state
II. One quasi-stable state
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
A monostable multivibrator has one stable state and one quasi-stable state: a trigger moves it to the quasi-stable state for a fixed time, after which it returns.
Q1524DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
In a demultiplexer,the number of output lines is n and the number of select lines is m. Which of the following is correct?
An = 2^m
Bm = 2^n
Cn = 2m
Dm = 2n
Show answerHide answer
Correct answer: (A) n = 2^m
Explanation
A demultiplexer with m select lines routes the input to one of 2^m outputs, so n = 2^m (e.g. 1-to-8 DEMUX has 3 select lines).
Q1525DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Both the inputs of XOR gate are connected to B. What will be the output?
A0
B1
CB
DB' (complement of B)
Show answerHide answer
Correct answer: (A) 0
Explanation
B ⊕ B = 0, because XOR gives 1 only when its inputs differ, and here both inputs are always equal.
Q1526DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
What is the full form of ISAM in file organisation?
ISAM is Indexed Sequential Access Method: records are stored sequentially by key and an index allows direct access.
Q1527DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Primary index in sequential order file organization is also known as ________.
ADense index
BClustering index
CNon-clustering index-
DSparse index
Show answerHide answer
Correct answer: (B) Clustering index
Explanation
Note from the source book: a primary index on a sequentially ordered file is in fact a sparse index (option d), but the official key (as per the Board) is (b) Clustering index.
Q1528DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Deductive model of DBMS is also known as ________.
AObject-oriented model
BInference model
CInteractive model
DDifferential model
Show answerHide answer
Correct answer: (B) Inference model
Explanation
A deductive database model derives new facts from stored facts using rules (logical inference), so it is also called the inference model.
Q1529DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
________ is a system database that contains description of the data in the database.
AData Catalog
BInformation Catalog
CRecord Catalog
DFile Catalog
Show answerHide answer
Correct answer: (A) Data Catalog
Explanation
The data catalog (data dictionary) is a system database holding metadata, i.e. the description of tables, columns, constraints and other database objects.
Q1530DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following statement(s) is/are correct regarding a relation in second normal form?
I. It is in first normal form
II. Every non-key attribute is fully and functionally independent on the primary key
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (A) Only I
Explanation
A 2NF relation must be in 1NF (I is correct). Statement II says non-key attributes are "independent" of the primary key, but 2NF requires them to be fully functionally dependent on it, so II is wrong.
Q1531DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
What is the value of F' (complement of F)?
F = AB + C'D + B'D
AA'B' + CD + BD
B(A' + B')(C + D')(B + D')
C(A + B)(C' + D)(B' + D)
DNone of these
Show answerHide answer
Correct answer: (B) (A' + B')(C + D')(B + D')
Explanation
By De Morgan's law the complement of a sum of products is a product of sums with each literal complemented: (AB)' = A' + B', (C'D)' = C + D', (B'D)' = B + D'. So F' = (A' + B')(C + D')(B + D').
Q1532DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following K-Map represent the function F?
F(A, B, C, D) = Σ(0, 1, 2, 6, 8, 9, 10)
(K-map rows AB and columns CD in Gray-code order 00, 01, 11, 10)
With columns CD = 00, 01, 11, 10: row AB=00 holds m0, m1, m3, m2 → 1 1 _ 1; row 01 holds m4, m5, m7, m6 → only m6; row 11 is empty; row 10 holds m8, m9, m11, m10 → 1 1 _ 1. This matches option A.
Q1533DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
A flip-flop is capable of storing ________ information.
A1 byte
B1 bit
C1 byte word
D1 nibble
Show answerHide answer
Correct answer: (B) 1 bit
Explanation
A flip-flop is a bistable circuit with two stable states, so it stores exactly one bit (0 or 1).
Q1534DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Shortcut key used to open Google chrome developer tools in windows is ________.
ACtrl + I
BCtrl + Shift + I
CShift + I
DCtrl + Alt + I
Show answerHide answer
Correct answer: (B) Ctrl + Shift + I
Explanation
In Chrome on Windows, Ctrl + Shift + I (or F12) opens Developer Tools.
Q1535DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following is/are correct?
I. The Journal is the book for chronological record
II. The ledger is the book for analytical record
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
The journal records transactions in date order (book of original entry, chronological), while the ledger classifies them account-wise (analytical record). Both statements are correct.
Q1536DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which of the following is/are the method(s) of calculating depreciation amount?
I. Straight line method
II. Written down value method
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
Depreciation can be charged by the straight line method (fixed amount each year) or the written down value method (fixed rate on the reducing balance). Both are standard methods.
Q1537DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Equivalence partitioning is a ________.
AWhite box testing method
BBlack box testing method
CComparison testing method
DLoop testing Method
Show answerHide answer
Correct answer: (B) Black box testing method
Explanation
Equivalence partitioning divides input data into valid and invalid classes and tests one value from each, using only the specification, so it is a black box technique.
Q1538DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
What is the other name of Data Flow Diagram (DFD)?
AFlow chart
BPictorial graph
CBubble chart
DDi graph
Show answerHide answer
Correct answer: (C) Bubble chart
Explanation
A DFD is also called a bubble chart because processes are drawn as circles (bubbles).
Q1539DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
In ________ model, software is developed in a series of incremental releases.
ASpiral
BSequential
CConcurrent
DRAD
Show answerHide answer
Correct answer: (A) Spiral
Explanation
In the spiral model (Boehm), software is developed in a series of evolutionary or incremental releases, one per loop of the spiral, with risk analysis in each cycle.
Q1540DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
What is the full form of CASE tool in software engineering?
CASE stands for Computer Aided Software Engineering: software tools that support analysis, design, coding and testing.
Q1541DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
According to Boehm's, what are the definitions of verification and validation?
AVerification: Is the software free of errors? Validation: Is the software commercially viable?
BVerification: Is the software commercially viable? Validation: Is the software free of errors?
CVerification: Are we building the product right? Validation: Are we building the right product?
DVerification: Are we building the right product? Validation: Are we building the product right?
Show answerHide answer
Correct answer: (C) Verification: Are we building the product right? Validation: Are we building the right product?
Explanation
Boehm's definitions: verification asks "Are we building the product right?" (conforms to specification) and validation asks "Are we building the right product?" (meets user needs).
Q1542DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which statement(s) is/are correct regarding the feasibility study?
I. It determines whether developing the product is financially feasible
II. It determines whether developing the product is technically feasible
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
A feasibility study checks whether a project is worth doing, including financial (economic) feasibility and technical feasibility, along with operational and schedule aspects.
Q1543DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
N is the number of nodes of the control graph and E is the number of edges in the control flow graph. What is Mc Cabe's cyclomatic complexity V(G)?
AV(G) = E + N + 2
BV(G) = E − N + 2
CV(G) = E + N − 2
DV(G) = E − N − 2
Show answerHide answer
Correct answer: (B) V(G) = E − N + 2
Explanation
McCabe's cyclomatic complexity for a connected control flow graph is V(G) = E − N + 2 (or number of decisions + 1).
Q1544DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
A java program that is embedded in HTML document and runs in the context of java capable browser is known as ________.
AApplet
BCanvas
CDoctags
DFrame Window
Show answerHide answer
Correct answer: (A) Applet
Explanation
An applet is a small Java program embedded in an HTML page and run by a Java-enabled browser.
Q1545DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Which statement in this code is unreachable?
switch (x)
{
Case 1:
a1 = 100;
Case 2:
a2 = 1000;
a3 = 10;
break;
a4 = 10000;
}
Aa1 = 100;
Ba2 = 1000;
Ca3 = 10;
Da4 = 10000;
Show answerHide answer
Correct answer: (D) a4 = 10000;
Explanation
After break the control leaves the switch, and no case label precedes a4 = 10000;, so that statement can never be reached. a1, a2 and a3 run for cases 1 and 2 (case 1 falls through).
Q1546DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
The process in an operating system in which the output of any program is not printed directly on printer but dumped onto a reserved area of a disk is known as ________.
ASystem call
BTear down operation
CSpooling
DSwapping
Show answerHide answer
Correct answer: (C) Spooling
Explanation
Spooling (Simultaneous Peripheral Operations On-Line) stores output on disk and sends it to the slow printer later, so the CPU need not wait for the printer.
Q1547DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Disabling an interrupt is known as ________.
AMasking
BRun
CStop
DHalt
Show answerHide answer
Correct answer: (A) Masking
Explanation
Disabling (masking) an interrupt means setting a mask bit so the CPU ignores that interrupt until it is unmasked.
Q1548DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Consider a main memory with the capacity of 3 page frames which are initially empty. Page reference is 4, 7, 6, 1, 7, 6, 1, 2, 7, 2. What is the number of page fault using optimal page replacement algorithm?
A7
B6
C5
D4
Show answerHide answer
Correct answer: (C) 5
Explanation
Faults for 4, 7, 6 (3). Page 1: evict 4 (never used again), fault 4. 7, 6, 1 hit. Page 2: evict 6 or 1 (never used again), fault 5. 7 and 2 hit. Total 5 page faults.
Q1549DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
Inner most layer of operating system which is always present in main memory is known as ________.
AHardware
BUser interface
CApplication program
DKernel
Show answerHide answer
Correct answer: (D) Kernel
Explanation
The kernel is the core of the OS that stays resident in main memory and directly manages CPU, memory and devices.
Q1550DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
The instruction which are executed only in kernel mode is known as ________.
AMemory instruction
BArithmetic instruction
CPrivileged instruction
DLogical instruction
Show answerHide answer
Correct answer: (C) Privileged instruction
Explanation
Privileged instructions (I/O, changing the timer, disabling interrupts, etc.) can run only in kernel mode; attempting them in user mode causes a trap.
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.