DSSSB TGT / PGT · Topic-wise previous year questions
Computer Science Previous Year Questions (page 45)
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 which of the following type of addressing mode, the instruction specifies a register
in the CPU whose contents give the address of the operand in memory?
ARegister indirect mode
BIndirect address mode
CImplied mode
DImmediate mode
Show answerHide answer
Correct answer: (A) Register indirect mode
Explanation
In register indirect mode the chosen register holds the memory address of the operand, not the operand itself.
Which of the following statement(s) is/are correct regarding Assembly language?
I. An assembler converts (or assembles) the symbolic program of an Assembly
language into its equivalent machine program.
II. A program written in an assembly language is machine dependent.
ABoth I and II
BOnly II
COnly I
DNeither I nor II
Show answerHide answer
Correct answer: (A) Both I and II
Explanation
An assembler translates assembly mnemonics into machine code, and because assembly instructions map to a specific processor's instruction set, the program is machine dependent. Both are true.
Which of the following statement is correct regarding point-to-point connection in the
data communication?
I. It provides a dedicated link between two devices.
II. It is a timeshared connection.
AOnly II
BBoth I and II
CNeither I nor II
DOnly I
Show answerHide answer
Correct answer: (D) Only I
Explanation
A point-to-point connection gives a dedicated link between exactly two devices. A shared, timeshared link describes a multipoint connection, so only I is correct.
In Direct Memory Access (DMA) ______, a block sequence consisting of a number of
memory words is transferred in a continuous burst.
ABus granting
BBurst transfer
CCycle stealing
DController count
Show answerHide answer
Correct answer: (B) Burst transfer
Explanation
In DMA burst transfer, a block of several memory words is sent in one continuous burst while the DMA controller holds the bus. Cycle stealing transfers one word at a time.
Which of the following normal form of normalization in relational model, disallows
relations within relations or relations as attribute values within tuples?
AFourth
BFirst
CSecond
DThird
Show answerHide answer
Correct answer: (B) First
Explanation
First Normal Form requires atomic attribute values, so it disallows nested relations or relations as attribute values within tuples.
Over half of the e-waste generated in the developed world are exported to
developing countries, mainly to ______, where metals like copper, iron, silicon, nickel
and gold are recovered during recycling process.
AAfghanistan
BKazakistan
CUAE
DIndia
Show answerHide answer
Correct answer: (D) India
Explanation
Much e-waste from developed countries is shipped to developing countries such as India, where metals like copper, iron, silicon, nickel and gold are recovered in recycling.
Which of the following is a one-dimensional labelled array capable of holding any data
type (integers, strings, floating point numbers, python objects, etc) in data handling
with pandas?
ASeries
BMissing data
CData frames
DIteration
Show answerHide answer
Correct answer: (A) Series
Explanation
A pandas Series is a one-dimensional labelled array that can hold any data type. A DataFrame is two-dimensional.
The E-waste (management) rules 2016 of India, recognizes two broad categories: IT
and telecommunication equipment and consumer electrical and electronics including
which of the following material?
I. Fluorescent
II. Mercury
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
The E-Waste (Management) Rules 2016 cover IT and telecom equipment and consumer electrical and electronics, and also include compact fluorescent lamps (CFL) and other mercury-containing lamps. So both apply.
If you encounter an import Error, what does it mean?
I. Python could find pandas in list of available libraries
II. Pandas couldn’t find python in list of available libraries
III. Python couldn’t find Pandas in list of available libraries
AOnly III
BI, II and III
COnly I
DOnly I and III
Show answerHide answer
Correct answer: (A) Only III
Explanation
An ImportError (here ModuleNotFoundError) means Python could not find the pandas module among installed libraries, so only III is correct.
Data frame in Pandas has a method which takes a column name (for a regular index) or
a list of column names to create a new, re-indexed data frame, which of the following
is correct method?
AdFb
Bdata.index ( )
Cset_index ( )
DdFmi
Show answerHide answer
Correct answer: (C) set_index ( )
Explanation
set_index() takes a column name or list of column names and returns a new DataFrame indexed by those columns.
Which of the following is correct for Identifiers name used in Python language?
AAn identifier can have underscore (_) symbol
BWe must use keywords as identifier
CThhere is restriction the length of an identifier
DAn identifier must start with a digit
Show answerHide answer
Correct answer: (A) An identifier can have underscore (_) symbol
Explanation
Python identifiers may contain letters, digits and underscores, so _ is allowed. They cannot start with a digit, cannot be keywords, and have no length limit.
Which of the following rule is needed to be followed while declaring the XML
(Extensible Markup Language) elements name?
AName must start with a number
BName can contain spaces
CName must not start with the letter xml
DName cannot contain letter, numbers and other characters
Show answerHide answer
Correct answer: (C) Name must not start with the letter xml
Explanation
XML element names must not start with "xml" (in any case), cannot start with a number or contain spaces, but can contain letters, digits and characters like hyphen and underscore.
In E-waste management, from which factors, there comes the exposure variability in
electronic waste?
AType of E-waste
BQuantity of the Pollutants in air
CManagement processes of the air pollution
DMedical waste
Show answerHide answer
Correct answer: (A) Type of E-waste
Explanation
Exposure variability depends mainly on the type of e-waste, since different devices contain different toxic substances such as lead, mercury and cadmium.
Which of the following maths function in SQL returns the smallest integer greater than,
or equal to, the specified numeric expression?
AROUND
BCEILING
CABS
DFLOOR
Show answerHide answer
Correct answer: (B) CEILING
Explanation
CEILING returns the smallest integer greater than or equal to the value, e.g. CEILING(4.2) = 5. FLOOR returns the largest integer less than or equal to it.
Which of the following page replacement algorithms(s) does not suffer from Belady’s
anomaly in Operating System?
I. Least-Recently Used (LRU) page replacement.
II. First-In, First-Out (FIFO) page replacement.
AOnly I
BNeither I nor II
COnly II
DBoth I and II
Show answerHide answer
Correct answer: (A) Only I
Explanation
LRU is a stack algorithm and never suffers from Belady's anomaly. FIFO can give more page faults with more frames, so it does suffer from it.
Which of the following phase of the compiler, gathers type information and saves it in
either the syntax tree or the symbol table, for subsequent use during intermediate
code generation?
ASemantic Analyzer
BCode Analyzer
CSyntax Analyzer
DLexical Analyzer
Show answerHide answer
Correct answer: (A) Semantic Analyzer
Explanation
The semantic analyzer checks meaning and gathers type information, storing it in the syntax tree or symbol table for intermediate code generation.
______ has been developed to incorporate all the character of every written language
of the world. It provides a unique number for every character, irrespective of device
[server, desktop, mob], OS [linux, win] or software application
AUNICODE
BBinary Code
CISCII
DASCII
Show answerHide answer
Correct answer: (A) UNICODE
Explanation
Unicode assigns a unique number (code point) to every character of every written language, regardless of platform, device or program.
ASCII (American Standard Code for Information Interchange) can only handle ______
or at most ______ languages and that shows its limitation to handle all world languages.
A2, 5
B1, 2
C1, 5
D3, 4
Show answerHide answer
Correct answer: (B) 1, 2
Explanation
ASCII uses 7 bits (128 characters), enough mainly for English, so it can handle only one, or at most two, languages.
In Database Management System (DBMS), which of the following term de fines a
collection of entities that have the same attributes in the database?
AEntity type
BValue set
CEntity set
DValue type
Show answerHide answer
Correct answer: (A) Entity type
Explanation
Per Elmasri-Navathe, an entity type defines a collection of entities that have the same attributes; the actual set of entities at a moment is the entity set.
Which of the following statement(s) is/are correct for context switching in Operating
System?
I. When a context switch occurs, the kernel saves the context of the old process in
its PCB (Process Control Block).
II. Context-Switch time is pure overhead, because the system does no useful work
while switching.
ANeither I nor II
BOnly I
COnly II
DBoth I and II
Show answerHide answer
Correct answer: (D) Both I and II
Explanation
During a context switch the kernel saves the old process state in its PCB and loads the new one's. This switching time is pure overhead, since no useful work is done. Both are correct.
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.