All 100 questions of DSSSB TGT Computer Science Practice Set 1 with the correct answer and a solution. Read them free on UTpaper, or attempt the paper as a timed online test.
Java is a ______ language. This means that you must be explicit about what type of data you are working with.
AWeakly typed
BStrongly typed
CDynamically typed
DLoosely typed
Show answerHide answer
Correct answer: (B) Strongly typed
Explanation
Java is strongly (and statically) typed: every variable must be declared with a type, and the compiler does not allow values of incompatible types to be mixed without an explicit cast.
______ is special effect in motion pictures and animations that changes one image or shape into another through a seamless transition.
ATweening
BInverse Kinematics
CMorphing
DTweaking
Show answerHide answer
Correct answer: (C) Morphing
Explanation
Morphing smoothly transforms one image or shape into another through intermediate frames. Tweening only generates in-between frames of position or motion, and inverse kinematics deals with jointed movement.
In which addressing mode, the operand is given explicitly in the instruction (example instruction : ADD R4, #3) ?
ABased Indexed mode
BAbsolute mode
CImmediate mode
DRegister indirect mode
Show answerHide answer
Correct answer: (C) Immediate mode
Explanation
In immediate addressing the operand value itself is part of the instruction; in ADD R4, #3 the constant 3 (marked by #) is used directly, with no memory lookup.
On which of the following storage media, storage of information is organized as a single continuous spiral groove ?
ACD-ROM
BRAM
CHard disk
DFloppy disk
Show answerHide answer
Correct answer: (A) CD-ROM
Explanation
A CD-ROM stores data as pits along one continuous spiral track running from the centre outward, while hard disks and floppy disks use concentric circular tracks.
The kernal keeps track of the state of each executing program by using a data structure called ______.
AProcess control block
BUser control block
CFile control block
DMemory control block
Show answerHide answer
Correct answer: (A) Process control block
Explanation
The OS stores each process's state, program counter, registers, scheduling and memory information in its Process Control Block (PCB), which it uses to save and restore the process during context switches.
The technology that stores only the essential instructions on a microprocessors chip and thus enhances its speed is referred to as :
AMIMD
BCISC
CRISC
DSIMD
Show answerHide answer
Correct answer: (C) RISC
Explanation
RISC (Reduced Instruction Set Computer) keeps only a small set of simple, essential instructions that run in about one clock cycle each, which increases speed. CISC uses many complex instructions.
Ten signals, each requiring 3000Hz, are multiplexed onto a single channel using FDM. How much minimum bandwidth is required for the multiplexed channel? Assume that the guard bands are 300 Hz wide.
A33,700
B30,000
C32,700
D33,000
Show answerHide answer
Correct answer: (C) 32,700
Explanation
Total bandwidth = 10 channels × 3000 Hz + 9 guard bands × 300 Hz = 30,000 + 2,700 = 32,700 Hz. Ten channels need only nine guard bands between them.
What is the updated aversion of the IT Act, 2000 called?
AIT Act, 2008
BAdvanced IT Act, 2000
CAdvanced IT Act, 2007
DIT Act, 2007
Show answerHide answer
Correct answer: (A) IT Act, 2008
Explanation
The IT Act, 2000 was amended by the Information Technology (Amendment) Act, 2008, which added offences such as cyber terrorism and identity theft. This amended version is called the IT Act, 2008.
What will the following code result in?
import pandas as pd
pd.Series ([10,20], index = ['A', 'B', 'C'])
AValueError
BNameError
CIndexError
DSyntaxError
Show answerHide answer
Correct answer: (A) ValueError
Explanation
The data list has 2 values but the index has 3 labels. pandas cannot match the lengths, so it raises a ValueError ("Length of values does not match length of index").
Given the following assignment of a variable LS
= [1, 9, 2, 8, 3, 7, 5, 4]
What will be the output of the following?
print (LS [::2]+ LS [::-2])
A[5, 3, 2, 1, 9, 8, 7, 4]
B[1, 2, 3, 5, 4, 7, 8, 9]
C[4, 7, 8, 9, 1, 2, 3, 5]
D[9, 8, 7, 4, 5, 3, 2, 1]
Show answerHide answer
Correct answer: (B) [1, 2, 3, 5, 4, 7, 8, 9]
Explanation
LS[::2] takes indexes 0, 2, 4, 6, giving [1, 2, 3, 5]. LS[::-2] starts from the last element and goes backwards in steps of 2, giving [4, 7, 8, 9]. Joined, they give [1, 2, 3, 5, 4, 7, 8, 9].
Which of the following is false about global variables in Python?
AGlobal immutable variables require global keyword inside function.
BGlobal mutable variables do not require global keyword inside function.
CGlobal keyword is a must for the first time of assignment of a global variable.
DGlobal variables can be accessed any where in the program.
Show answerHide answer
Correct answer: (C) Global keyword is a must for the first time of assignment of a global variable.
Explanation
A variable assigned at the top level of a module is already global, so no global keyword is needed for that first assignment. The keyword is needed only when a function wants to rebind a global name.
Which computer hardware device used to convert data from a digital format into a format suitable for an analog transmission medium? Select the best answer out of the given options.
AModem
BSwitch
CRepeater
DHub
Show answerHide answer
Correct answer: (A) Modem
Explanation
A modem (modulator-demodulator) converts digital data into analog signals for transmission over telephone lines and converts them back at the receiver. Switches, hubs and repeaters handle signals that stay digital.
Consider the following two C++ statements and the accompanying contexts.
(A) return P→next = = NULL; // P is a pointer to an element in the link list L.
(B) return S → next == NULL; // S is a stack implemented as a link list.
If the return value is TRUE in both cases, which of the following is correct ?
AP points to the last element in L and S is empty.
BP points to the last element in L and S is full.
CL is empty and S is full.
DBoth L and S are empty.
Show answerHide answer
Correct answer: (B) P points to the last element in L and S is full.
Explanation
Answer as per the book's key (b). Note that S→next == NULL would normally mean the stack is empty, so this question is doubtful.
Consider the following statements about searching algorithms and choose the correct option.
ASequential search requires the list to be ordered, while there is no such constraint for Binary search.
BBinary search has time complexity of O(log₂ n), while sequential search has time complexity of O(n). Here, n is the number of elements in the list.
CLink list is a suitable data structure for storing a list, and performing Binary search.
DThe best case in Binary search is, when the key element exists in the begining of the list.
Show answerHide answer
Correct answer: (B) Binary search has time complexity of O(log₂ n), while sequential search has time complexity of O(n). Here, n is the number of elements in the list.
Explanation
Corrected: the book's key says (c), but (b) is the true statement. Binary search needs random access, so a linked list is unsuitable for it.
Which of the following is not an example of an application of a Database ?
AVIDEO Editing
BProfile Management System
CResult Management System
DInventory Control System
Show answerHide answer
Correct answer: (A) VIDEO Editing
Explanation
Video editing works on audio and video media streams and is not organised around stored records. Profile, result and inventory systems are classic database applications.
Which of the following options appropriately represent the relationship shown in the diagram ?
Diagram: entity box E1 is joined to entity box E2 by a line labelled R; the line ends in a crow's-foot (many) symbol at the E1 side and has a plain end at the E2 side.
AONE - TO - ONE
BONE - TO - MANY
CMANY - TO - ONE
DMANY - TO - MANY
Show answerHide answer
Correct answer: (C) MANY - TO - ONE
Explanation
The crow's foot (many) is on the E1 side and the plain (one) end is on the E2 side. Many E1 entities relate to one E2 entity, so the relationship is many-to-one.
Given the following program fragment to add two integer arrays A and B, each of size N. The sum is stored in integer array C of the same size.
for (i=1; i<=N; i++)
C[i] = A[i]+B[i];
The running time of this for loop is ______.
AO(1)
BO(N)
CO(2N)
DO(N²)
Show answerHide answer
Correct answer: (B) O(N)
Explanation
The loop body does constant work and runs N times, so the running time is linear, O(N). O(2N) also simplifies to O(N).
Which of the following cannot be represented as a tree ?
AUnix directory without links
BTable of Content of a book
CCustomer calls in a call centre
DArithmetic expression
Show answerHide answer
Correct answer: (C) Customer calls in a call centre
Explanation
Customer calls in a call centre are served in arrival order (first in, first out), so they form a queue, not a hierarchy. Directories, a table of contents and arithmetic expressions are naturally hierarchical trees.
______ is a sequence of memory read-write operations that are atomic.
ACritical section object
BAdaptive mutex
CTurnstile
DMemory transaction
Show answerHide answer
Correct answer: (D) Memory transaction
Explanation
In transactional memory, a memory transaction is a sequence of memory read-write operations that is atomic: either all of them take effect (commit) or none do.
The positioning time or random access time, consists of two parts: the time necessary to move the disk arm to the desired cylinder, called
ASeek time
BRotational latency
CFlash drives
DTransfer rate
Show answerHide answer
Correct answer: (A) Seek time
Explanation
Positioning time is seek time plus rotational latency. Seek time is the time to move the disk arm to the desired cylinder, and rotational latency is the wait for the sector to rotate under the head.
AA process of re-arranging a given set of objects in a specific order.
BTo facilitate the later search for members of the sorted set.
CIs a relevant and essential activity, particularly in data processing.
DAll of these
Show answerHide answer
Correct answer: (A) A process of re-arranging a given set of objects in a specific order.
Explanation
Sorting is defined as re-arranging a given set of objects in a specific order (Wirth's definition). The other options describe why sorting is useful, not what sorting is.
The figure compares pairs, moves the smaller key up each level and puts the minimum (06) at the root. This tournament-style structure is tree (tournament) sort.
Which constructor will be called by the following lines of code.?
(i) Student S1;
(ii) Student S2 = S1
AFirst copy constructor, then default constructor.
BFirst default constructor, then copy constructor.
CDefault constructors for both lines of code.
DCopy constructors for both lines of code.
Show answerHide answer
Correct answer: (B) First default constructor, then copy constructor.
Explanation
Student S1; creates an object with no arguments, so the default constructor is called. Student S2 = S1; initialises a new object from an existing one, so the copy constructor is called.
______ memory is intended to give memory speed approaching that of the fastest memories available, and at the same time provide a large memory size at the price of less expensive types of semiconductor memories.
ARegister
BCounter
CFlip flop
DCache
Show answerHide answer
Correct answer: (D) Cache
Explanation
Cache is a small, fast memory between the CPU and main memory. It gives near-register speed for frequently used data, while the large cheaper main memory provides the size.
The maximum number of comparisons for a particular record among 32 sorted records through Binary Search method will be :
A2
B16
C8
D5
Show answerHide answer
Correct answer: (D) 5
Explanation
Binary search halves the list at each step, and 32 = 2⁵, so it takes about log₂32 = 5 comparisons. Strictly, the worst case is ⌊log₂32⌋ + 1 = 6, but 6 is not an option, so the intended answer is 5.
In relational databases, the natural join of two tables is :
ACartesian Product always.
BCombination of Union and filtered Cartesian Product.
CCombination of Selection and filtered Cartesian Product.
DCombination of Projection and filtered Cartesian Product.
Show answerHide answer
Correct answer: (D) Combination of Projection and filtered Cartesian Product.
Explanation
A natural join takes the Cartesian product, keeps the rows where common attributes are equal (selection), then projects away the duplicate columns. So it is a projection of a filtered Cartesian product.
Which of the following techniques allows execution of programs larger than the size of physical memory ?
AThrashing
BDMA
CBuffering
DDemand paging
Show answerHide answer
Correct answer: (D) Demand paging
Explanation
Demand paging (virtual memory) loads pages only when they are needed, so a program larger than physical memory can still run. Thrashing is a performance problem, not a technique.
For the following binary tree inorder traversal yields the expression :
Binary tree: root is '−'; its left child is '+' and its right child is '/'.
'+' has left child 'a' and right child '*'; '*' has children 'b' (left) and 'd' (right).
'/' has children 'e' (left) and 'f' (right).
A− + * / abdef
Ba + bd * − ef /
Cabdef* / + −
Da + b * d − e/f
Show answerHide answer
Correct answer: (D) a + b * d − e/f
Explanation
Inorder traversal visits left subtree, root, then right subtree. Left subtree gives a + b * d, then the root −, then the right subtree e / f, giving a + b * d − e/f.
In structured programming, a program is decomposed into modules. Coupling and cohesion describe the characteristics of modules. A good decomposition should attempt to :
AMinimize coupling and minimize cohesion.
BMaximize coupling and minimize cohesion.
CMinimize coupling and maximize cohesion.
DMaximize coupling and maximize cohesion.
Show answerHide answer
Correct answer: (C) Minimize coupling and maximize cohesion.
Explanation
Good modular design aims for low coupling (little dependence between modules) and high cohesion (each module focuses on one task).
Consider the database table "Persons" having persons_ID as the primary key:
person_ID | Name | Age
1000 | Rajan | 40
- | Jatin | -45
1001 | Rajesh | 35
What are the constraints violated by the above table ?
ARelationship integrity
BReferential integrity only
CEntity and domain integrities
DReferential and domain integrities
Show answerHide answer
Correct answer: (C) Entity and domain integrities
Explanation
A missing person_ID breaks entity integrity, because a primary key cannot be null. An age of −45 is outside the valid domain, so domain integrity is also broken.
Assume the C++ definition : class circle : public point
Which of the following is false?
A'Point' is the base class and 'circle' is the derived class.
BThe colon (:) in the header of class definition indicates inheritance.
CThe keyword 'public' indicates type of inheritance.
DAll the public and protected members of class 'circle' are inherited as public and protected members, respectively, into class 'point'.
Show answerHide answer
Correct answer: (D) All the public and protected members of class 'circle' are inherited as public and protected members, respectively, into class 'point'.
Explanation
Inheritance flows from the base class to the derived class. The public and protected members of point are inherited into circle, not the other way round, so statement D is false.
Which of the following data structures is most suitable for evaluating postfix expressions?
ATree
BStack
CLinked list
DQueue
Show answerHide answer
Correct answer: (B) Stack
Explanation
Operands are pushed onto a stack. When an operator is read, the top two operands are popped, the operator is applied and the result is pushed back, so a stack is the natural structure for postfix evaluation.
In a computer system, memory mapped access takes 100 nanoseconds when a page is found in TLB. In case the page is not TLB, it takes 400 nanoseconds to access. Assuming a hit ratio of 80%, the effective access time is:
Consider the following code segment in C++. How many times the for loop will be repeated?
int main ( )
{
int f = 1;
for (; f ;)
cout <<"f = " <<f++<<"\n";
return 0;
}
A10 times
BNot even once
CRepeated forever
DOnly once
Show answerHide answer
Correct answer: (C) Repeated forever
Explanation
for(; f ;) has no update expression of its own, and f starts at 1 and is incremented each time by f++. f never becomes 0 in normal counting, so the condition stays true and the loop runs forever.
Which of the following is/are wrong?
(A) RAM and ROM are volatile memories,
(B) ROMs, PROMs and EPROMs are non-volatile memories.
(C) RAM and Dynamic RAM are same.
(D) A Random Access Memory (RAM) is a read write memory.
A(A) and (B)
B(A) and (C)
C(A) and (D)
D(C) and (D)
Show answerHide answer
Correct answer: (B) (A) and (C)
Explanation
(A) is wrong because ROM is non-volatile. (C) is wrong because RAM includes both static and dynamic RAM. (B) and (D) are true.
Which of the following is an advantage of computer networks?
AResource sharing
BImproving reliability and availability
CEnhancing performance
DAll of the above
Show answerHide answer
Correct answer: (D) All of the above
Explanation
Networks allow resource sharing, improve reliability and availability through redundancy, and improve performance by spreading load. All three are advantages.
In a slotted ring, a station may transmit only when it holds an empty slot or token circulating on the ring. CSMA/CD is a contention (random access) protocol.
The best suited hidden surface algorithm to deal with non-polygonal, non-planar surface patches is
AZ-buffer algorithm
BRay tracing algorithm
CPainter's algorithm
DScan line algorithm
Show answerHide answer
Correct answer: (A) Z-buffer algorithm
Explanation
The z-buffer method stores a depth value for every pixel, so it can handle any surface for which depth can be computed at each pixel, including non-polygonal and non-planar patches, with no sorting needed.
Assume the following C variable declaration:
int * A [10], B [10][10];
Among the following expressions, which will not give compile time errors if used as left-hand side of assignment statements in a C program?
I. A[2]
II. A[2][3]
III. B[1]
IV. B[2][3]
AI, II and IV only
BII, III and IV only
CII and IV only
DIV only
Show answerHide answer
Correct answer: (A) I, II and IV only
Explanation
A[2] is an int pointer, A[2][3] is an int reached through it, and B[2][3] is an int, so all three can be assigned. B[1] is an array (int[10]), and an array cannot be assigned, so only I, II and IV are valid.
What is the output of the following C program?
# include
int main ( )
{
int index;
for (index = 1; index < = 5; index ++)
{
printf ("%d", index);
if (index = = 3)
continue;
}
}
A1245
B12345
C12245
D12354
Show answerHide answer
Correct answer: (B) 12345
Explanation
printf runs before the if statement, so continue only skips the (empty) rest of the loop body. Every value from 1 to 5 is printed: 12345.
An analog signal carries 4 bits in each signal unit. If 1000 signal units are sent per second, then baud rate and bit rate of the signal are ______ and ______.
A1000 bauds/sec, 4000 bps
B1000 bauds/ sec, 500 bps
C4000 bauds/ sec, 1000 bps
D2000 bauds/sec, 1000 bps
Show answerHide answer
Correct answer: (A) 1000 bauds/sec, 4000 bps
Explanation
Baud rate = 1000 signal units per second. Bit rate = baud × bits per unit = 1000 × 4 = 4000 bps.
An operating system contains 3 user processes each requiring 2 units of resource R. The minimum number of units of R such that no deadlock will ever occur is :
A5
B2
C3
D4
Show answerHide answer
Correct answer: (D) 4
Explanation
With n processes each needing k units, n(k−1) + 1 units guarantee no deadlock: 3 × (2−1) + 1 = 4.
Identify the Boolean expression from the given options, which is equivalent to the Logic Circuit Diagram.
Circuit: A and B' (B through a NOT gate) feed an OR gate; the OR output and C' (C through a NOT gate) feed an AND gate; the AND output and D feed a second OR gate, whose output is the circuit output.
A(A + B').C' + D
BA.B' + C'.D
CA+B'.C'+D
D(A.B' + C').D
Show answerHide answer
Correct answer: (A) (A + B').C' + D
Explanation
The first OR gate gives A + B', which is ANDed with C' to give (A + B')·C'. This result is ORed with D, so the output is (A + B')·C' + D.
On 31st March 2024, the cash balance of a company is ₹4,00,000. During April, cash receipts are ₹3,20,000 and cash payments are ₹2,80,000. Outstanding salary is ₹20,000. What is the cash balance on 30th April?
A₹4,20,000
B₹4,40,000
C₹4,60,000
D₹4,00,000
Show answerHide answer
Correct answer: (B) ₹4,40,000
Explanation
Closing cash = 4,00,000 + 3,20,000 − 2,80,000 = ₹4,40,000. Outstanding salary has not been paid in cash, so it does not reduce the cash balance.
Ram and sita's father brought toys for them. Individually (by default) he gifted the boy an airplane. Which feature of social culture is highlighted in the statement?
AMarginalization
BEquality
CFeminism
DStereotype
Show answerHide answer
Correct answer: (D) Stereotype
Explanation
Automatically giving the boy an airplane, a toy assumed to be "for boys", reflects a gender stereotype.
Which of the following is not a factor in the influence of social culture on the development of the child ?
ANuclear
BExaminations
CUrbanization
DReligious center
Show answerHide answer
Correct answer: (B) Examinations
Explanation
Family type (nuclear), urbanization and religious institutions are socio-cultural influences on a child. Examinations are part of the school system, not a socio-cultural factor.
A child from the Gond tribe came to the, city with his family. He was admitted to a nearby public school. Months later, he still couldn't make friends, wasn't able to be a part of a group. The teacher used to ignore his interests which destroyed his self-confidence. Which feature of social culture is being highlighted in the above situation?
AMarginalization
BFeminism
CStereotypes
DUrbanization
Show answerHide answer
Correct answer: (A) Marginalization
Explanation
The tribal child is excluded from peer groups and his interests are ignored by the teacher, which pushes him to the edge of the group. This is marginalization.
Various Policies have been framed in NEP 1986, 1992, 2005 and 2020. All these policies made by the Ministry of Education and other authorities have been placed in the best category, under which dimension of the socio-cultural environmenta?
APolitical
BEconomic
CSocial
DTechnological
Show answerHide answer
Correct answer: (A) Political
Explanation
Education policies framed by the government and authorities belong to the political dimension of the socio-cultural environment.