Practice Set · Questions with answers

DSSSB TGT Computer Science Practice Set 1

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.

  • 100 questions
  • 100 explained
  • Free
Q1
Java is a ______ language. This means that you must be explicit about what type of data you are working with.
  1. AWeakly typed
  2. BStrongly typed
  3. CDynamically typed
  4. 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.

Q2
With SQL, how can you return the number of records in the "Persons" table?
  1. ASELECT COUNT (*) FROM Persons
  2. BSELECT COUNT () FROM Persons
  3. CSELECT COUNT () FROM Persons
  4. DSELECT COLUMN (*) FROM Persons
Show answerHide answer

Correct answer: (A) SELECT COUNT (*) FROM Persons

Explanation

Options (b) and (c) are printed identically in the source book.

Q3
______ is special effect in motion pictures and animations that changes one image or shape into another through a seamless transition.
  1. ATweening
  2. BInverse Kinematics
  3. CMorphing
  4. 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.

Q4
In which addressing mode, the operand is given explicitly in the instruction (example instruction : ADD R4, #3) ?
  1. ABased Indexed mode
  2. BAbsolute mode
  3. CImmediate mode
  4. 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.

Q5
On which of the following storage media, storage of information is organized as a single continuous spiral groove ?
  1. ACD-ROM
  2. BRAM
  3. CHard disk
  4. 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.

Q6
The kernal keeps track of the state of each executing program by using a data structure called ______.
  1. AProcess control block
  2. BUser control block
  3. CFile control block
  4. 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.

Q7
The technology that stores only the essential instructions on a microprocessors chip and thus enhances its speed is referred to as :
  1. AMIMD
  2. BCISC
  3. CRISC
  4. 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.

Q8
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.
  1. A33,700
  2. B30,000
  3. C32,700
  4. 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.

Q9
What is the updated aversion of the IT Act, 2000 called?
  1. AIT Act, 2008
  2. BAdvanced IT Act, 2000
  3. CAdvanced IT Act, 2007
  4. 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.

Q10
What minimum and maximum values will be generated for the following Python statement? print (random.randrange (100)+1)
  1. A1 and 100
  2. B0 and 100
  3. C1 and 99
  4. D0 and 99
Show answerHide answer

Correct answer: (A) 1 and 100

Explanation

random.randrange(100) returns an integer from 0 to 99 (the stop value is excluded). Adding 1 gives a range of 1 to 100.

Q11
What will the following code result in? import pandas as pd pd.Series ([10,20], index = ['A', 'B', 'C'])
  1. AValueError
  2. BNameError
  3. CIndexError
  4. 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").

Q12
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])
  1. A[5, 3, 2, 1, 9, 8, 7, 4]
  2. B[1, 2, 3, 5, 4, 7, 8, 9]
  3. C[4, 7, 8, 9, 1, 2, 3, 5]
  4. 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].

Q13
What will the following code result in? import numpy as np A = np.array ([12, 23]) B = np.array ([10, 20]) print (A-B)
  1. A[-2 -3]
  2. B[[12 23] [10 20]]
  3. C[[10 20] [12 23]]
  4. D[2 3]
Show answerHide answer

Correct answer: (D) [2 3]

Explanation

NumPy subtracts arrays element by element: [12−10, 23−20] = [2 3]. It does not stack or combine the arrays.

Q14
Which of the following is false about global variables in Python?
  1. AGlobal immutable variables require global keyword inside function.
  2. BGlobal mutable variables do not require global keyword inside function.
  3. CGlobal keyword is a must for the first time of assignment of a global variable.
  4. 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.

Q15
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.
  1. AModem
  2. BSwitch
  3. CRepeater
  4. 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.

Q16
GPRS is basically the standard-bearer of:
  1. A2.5G technology
  2. B3G technology
  3. C4G technology
  4. D2G technology
Show answerHide answer

Correct answer: (A) 2.5G technology

Explanation

GPRS adds packet-switched data to 2G GSM networks. It sits between 2G and 3G, so it is called 2.5G technology.

Q17
Which of the following attribute of the <TABLE> tag specifies the amount of space between the border and the contents of the cell?
  1. APADDING
  2. BSPACING
  3. CCELL PADDING
  4. DCELL SPACING
Show answerHide answer

Correct answer: (C) CELL PADDING

Explanation

CELLPADDING sets the space between a cell's border and its content. CELLSPACING sets the space between neighbouring cells.

Q18
What is the correct usage of the FRAMEBORDER attribute of the <FRAME> tag in HTML ?
  1. ASpecifies the color of the border of the frame
  2. BSpecifies the status of scroll bars of a frame
  3. CSpecifies the distance between top and bottom edge of the frame and frame contents
  4. DSpecifies whether the border should be visible or not
Show answerHide answer

Correct answer: (D) Specifies whether the border should be visible or not

Explanation

FRAMEBORDER takes 1 or 0 (yes or no) and controls whether a border is shown around the frame. It does not set the border colour or the scrollbars.

Q19
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 ?
  1. AP points to the last element in L and S is empty.
  2. BP points to the last element in L and S is full.
  3. CL is empty and S is full.
  4. 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.

Q20
Consider the following statements about searching algorithms and choose the correct option.
  1. ASequential search requires the list to be ordered, while there is no such constraint for Binary search.
  2. 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.
  3. CLink list is a suitable data structure for storing a list, and performing Binary search.
  4. 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.

Q21
The Boolean expression : a' · b + a · b' Where a, b are Boolean operands, can equivalently represented by :
  1. ANAND
  2. BNOR
  3. CXOR
  4. DOR
Show answerHide answer

Correct answer: (C) XOR

Explanation

a'b + ab' is 1 only when a and b differ, which is exactly the definition of XOR (a ⊕ b).

Q22
Identify the simplified and equivalent Boolean expression for the K-Map: cd \ ab | 00 | 01 | 11 | 10 00 | 0 | 0 | 0 | 0 01 | 1 | 1 | 1 | 1 11 | 1 | 1 | 1 | 1 10 | 0 | 0 | 0 | 0
  1. Aa
  2. Bb
  3. Cc
  4. Dd
Show answerHide answer

Correct answer: (D) d

Explanation

The 1s fill the rows cd = 01 and cd = 11 for every value of ab. In both rows d = 1, while c and a, b change, so the expression is F = d.

Q23
To make a layer completely transparent you will:
  1. AIncrease the opacity of the layer.
  2. BDecrease the opacity of the layer
  3. CMake the canvas transparent
  4. DAll layers are by default transparent
Show answerHide answer

Correct answer: (B) Decrease the opacity of the layer

Explanation

Opacity measures how solid a layer is. Lowering it to 0% makes the layer fully transparent, and raising it makes the layer more solid.

Q24
Which of the following crime does not fall under CYBER CRIME ?
  1. APosting abusive text messages on Social media
  2. BStealing a Pen drive having important files
  3. CGetting unauthorised access to someone's online account
  4. DStealing Computer Speaker from friend's house
Show answerHide answer

Correct answer: (D) Stealing Computer Speaker from friend's house

Explanation

Stealing a computer speaker is ordinary physical theft. No computer, network or data is used to commit the offence, so it is not a cyber crime.

Q25
The term used to animate each letter of a word Separately is ______.
  1. AFrame - by - frame animation
  2. BConvert to symbol
  3. CBreak apart
  4. DMorphing
Show answerHide answer

Correct answer: (C) Break apart

Explanation

In Flash, Break Apart (Ctrl+B) splits a text block into separate letters, so each letter can be placed on its own layer and animated separately.

Q26
The ______ is a holding place for all symbols and imported images and sounds within a single flash file.
  1. ALibrary
  2. BTimeline
  3. CTools Panel
  4. DProperties Panel
Show answerHide answer

Correct answer: (A) Library

Explanation

The Library panel of a Flash file stores all its symbols, plus any imported bitmaps, sounds and videos, so they can be reused across the document.

Q27
Which of the following is not an example of an application of a Database ?
  1. AVIDEO Editing
  2. BProfile Management System
  3. CResult Management System
  4. 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.

Q28
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.
  1. AONE - TO - ONE
  2. BONE - TO - MANY
  3. CMANY - TO - ONE
  4. 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.

Q29
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 ______.
  1. AO(1)
  2. BO(N)
  3. CO(2N)
  4. 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).

Q30
Which of the following cannot be represented as a tree ?
  1. AUnix directory without links
  2. BTable of Content of a book
  3. CCustomer calls in a call centre
  4. 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.

Q31
What will the following expression evaluate to? 3+2*5−32/8
  1. A9
  2. B24
  3. C5.75
  4. D21
Show answerHide answer

Correct answer: (A) 9

Explanation

Multiplication and division are done before addition and subtraction: 2*5 = 10 and 32/8 = 4, so 3 + 10 − 4 = 9.

Q32
What is the correct order of execution of logical operators present in an expression ?
  1. ANOT BRACKETS AND OR
  2. BNOT AND OR BRACKETS
  3. CNOT OR AND BRACKETS
  4. DBRACKETS NOT AND OR
Show answerHide answer

Correct answer: (D) BRACKETS NOT AND OR

Explanation

Brackets are evaluated first. Among the logical operators, NOT has the highest precedence, then AND, then OR.

Q33
______ is a sequence of memory read-write operations that are atomic.
  1. ACritical section object
  2. BAdaptive mutex
  3. CTurnstile
  4. 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.

Q34
The reduced expression for the following expression using a Karnaugh Map F (W,X,Y,Z) =∑(0,4,8,12) is :
  1. AYZ
  2. BY'Z'
  3. CY+Z
  4. DY'+Z'
Show answerHide answer

Correct answer: (B) Y'Z'

Explanation

Minterms 0, 4, 8 and 12 are exactly the cells where Y = 0 and Z = 0, whatever W and X are. These four cells form one group, so F = Y'Z'.

Q35
______ is a technique where the same objects shown further away are shown proportionately smaller.
  1. ADimension
  2. BPerspective
  3. CCompression
  4. DLocalization
Show answerHide answer

Correct answer: (B) Perspective

Explanation

Perspective makes objects that are farther away appear proportionally smaller, which gives a sense of depth in a two-dimensional image.

Q36
Which of the following is interactive ?
  1. AA radio broadcast
  2. BA talk show on TV
  3. CA newspaper
  4. DA computer game
Show answerHide answer

Correct answer: (D) A computer game

Explanation

A computer game responds to the player's input, so it is interactive. Radio, TV talk shows and newspapers are one-way media for the audience.

Q37
What is coalescing ?
  1. AIt is second strategy for allocating kernel memory.
  2. BThe buddy system allocates memory from a fixed size segment consisting of physically contiguous pages .
  3. CKernel memory is often allocated from a free-memory pool different from the list used to satisfy ordinary user made processes
  4. DAn advantage of the buddy system is how quickly adjacent buddies can be combined to form larger segments using this technique.
Show answerHide answer

Correct answer: (D) An advantage of the buddy system is how quickly adjacent buddies can be combined to form larger segments using this technique.

Explanation

In the buddy system, when a block is freed, it can be quickly merged with its free buddy to form a larger segment. This merging is called coalescing.

Q38
The positioning time or random access time, consists of two parts: the time necessary to move the disk arm to the desired cylinder, called
  1. ASeek time
  2. BRotational latency
  3. CFlash drives
  4. 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.

Q39
Sorting is
  1. AA process of re-arranging a given set of objects in a specific order.
  2. BTo facilitate the later search for members of the sorted set.
  3. CIs a relevant and essential activity, particularly in data processing.
  4. 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.

Q40
The figure below represents a ______ sort. Figure (tree): Leaves (left to right): 44, 55, 12, 42, 94, 18, 06, 67 Level above leaves: 44 (from 44, 55), 12 (from 12, 42), 18 (from 94, 18), 06 (from 06, 67) Next level: 12 (from 44, 12), 06 (from 18, 06) Root: 06 (from 12, 06)
  1. ABubble
  2. BShake
  3. CTree
  4. DInsertion
Show answerHide answer

Correct answer: (C) Tree

Explanation

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.

Q41
Which constructor will be called by the following lines of code.? (i) Student S1; (ii) Student S2 = S1
  1. AFirst copy constructor, then default constructor.
  2. BFirst default constructor, then copy constructor.
  3. CDefault constructors for both lines of code.
  4. 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.

Q42
______ 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.
  1. ARegister
  2. BCounter
  3. CFlip flop
  4. 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.

Q43
The maximum number of comparisons for a particular record among 32 sorted records through Binary Search method will be :
  1. A2
  2. B16
  3. C8
  4. 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.

Q44
What is the octal equivalent of the hexadecimal number 132A?
  1. A46252
  2. B11450
  3. C11452
  4. D46250
Show answerHide answer

Correct answer: (C) 11452

Explanation

132A in hex = 0001 0011 0010 1010 in binary. Regrouping in 3s from the right gives 1 001 100 101 010 = 11452 in octal.

Q45
The complexity of linear search algorithm is :
  1. AO (n log n)
  2. BO (n)
  3. CO (log n)
  4. DO (n*n)
Show answerHide answer

Correct answer: (B) O (n)

Explanation

Linear search may have to check every one of the n elements in the worst case, so it takes O(n) time.

Q46
In relational databases, the natural join of two tables is :
  1. ACartesian Product always.
  2. BCombination of Union and filtered Cartesian Product.
  3. CCombination of Selection and filtered Cartesian Product.
  4. 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.

Q47
Which of the following techniques allows execution of programs larger than the size of physical memory ?
  1. AThrashing
  2. BDMA
  3. CBuffering
  4. 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.

Q48
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).
  1. A− + * / abdef
  2. Ba + bd * − ef /
  3. Cabdef* / + −
  4. 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.

Q49
In structured programming, a program is decomposed into modules. Coupling and cohesion describe the characteristics of modules. A good decomposition should attempt to :
  1. AMinimize coupling and minimize cohesion.
  2. BMaximize coupling and minimize cohesion.
  3. CMinimize coupling and maximize cohesion.
  4. 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).

Q50
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 ?
  1. ARelationship integrity
  2. BReferential integrity only
  3. CEntity and domain integrities
  4. 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.

Q51
Assume the C++ definition : class circle : public point Which of the following is false?
  1. A'Point' is the base class and 'circle' is the derived class.
  2. BThe colon (:) in the header of class definition indicates inheritance.
  3. CThe keyword 'public' indicates type of inheritance.
  4. 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.

Q52
Which of the following Java statements declare and allocate a 2-dimensional array of integers with four rows and five columns.
  1. Aint array [][] = new int [5][4];
  2. Bint array [4][5];
  3. Cint array [5][4];
  4. Dint array [][] = new int [4][5];
Show answerHide answer

Correct answer: (D) int array [][] = new int [4][5];

Explanation

In Java, new int[4][5] creates 4 rows and 5 columns. Declarations like int array[4][5] are not valid Java, and [5][4] has the dimensions reversed.

Q53
Which of the following data structures is most suitable for evaluating postfix expressions?
  1. ATree
  2. BStack
  3. CLinked list
  4. 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.

Q54
The major goal of object – oriented programming is :
  1. ATop-down program development
  2. BSpeed
  3. CUser – interface
  4. DReuse
Show answerHide answer

Correct answer: (D) Reuse

Explanation

The main goal of OOP is reusability: classes, inheritance and polymorphism let existing code be reused and extended.

Q55
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:
  1. A120 nanoseconds
  2. B160 nanoseconds
  3. C200 nanoseconds
  4. D500 nanoseconds
Show answerHide answer

Correct answer: (B) 160 nanoseconds

Explanation

EAT = 0.8 × 100 + 0.2 × 400 = 80 + 80 = 160 ns.

Q56
Consider the following code segment: int x = 22, y = 15; x = (x>y) ? (x+y) : (x−y); What will be the value of x after the code is executed?
  1. A22
  2. B37
  3. C7
  4. D37 and 7
Show answerHide answer

Correct answer: (B) 37

Explanation

Since 22 > 15 is true, the conditional operator picks x + y = 22 + 15 = 37, which is assigned to x.

Q57
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; }
  1. A10 times
  2. BNot even once
  3. CRepeated forever
  4. 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.

Q58
While making bulleted lists, which of the following options are available?
  1. ASquare, disc, triangle
  2. BTriangle, disc, circle
  3. CTriangle, square, circle
  4. DDisc, square, circle
Show answerHide answer

Correct answer: (D) Disc, square, circle

Explanation

Unordered list bullets in HTML (the type attribute) can be disc, square or circle. Triangle is not a standard bullet type.

Q59
Machine that places the request to access the data, is generally called as ______.
  1. AServer machine
  2. BClient machine
  3. CRequest machine
  4. DIntelligent machine
Show answerHide answer

Correct answer: (B) Client machine

Explanation

In the client-server model, the client sends a request for data or a service, and the server processes the request and returns the result.

Q60
In which case it is mandatory to provide a destructor in a class?
  1. AAlmost in every class
  2. BClass for which two or more than two objects will be created.
  3. CClass for which copy constructor is defined.
  4. DClass whose objects will be created dynamically.
Show answerHide answer

Correct answer: (D) Class whose objects will be created dynamically.

Explanation

A class whose objects are created dynamically, or that allocates memory with new, needs a destructor to free that memory. Otherwise the memory leaks.

Q61
Von Neumann computer architecture is ______.
  1. ASISD
  2. BSIMD
  3. CMIMD
  4. DMISD
Show answerHide answer

Correct answer: (A) SISD

Explanation

A Von Neumann machine runs one instruction stream on one data stream at a time, which in Flynn's classification is SISD.

Q62
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.
  1. A(A) and (B)
  2. B(A) and (C)
  3. C(A) and (D)
  4. 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.

Q63
Which of the following techniques is used for transmitting digital signal?
  1. AAmplitude modulation
  2. BFrequency modulation
  3. CPulse code modulation
  4. DAmplitude shift keying
Show answerHide answer

Correct answer: (C) Pulse code modulation

Explanation

Pulse code modulation samples, quantises and encodes a signal into binary pulses, giving a digital signal. AM, FM and ASK modulate an analog carrier.

Q64
Which of the following is an advantage of computer networks?
  1. AResource sharing
  2. BImproving reliability and availability
  3. CEnhancing performance
  4. 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.

Q65
A network spreading in different geographical locations is known as
  1. ALAN
  2. BWAN
  3. CBoth (a) and (b)
  4. DNone of the above
Show answerHide answer

Correct answer: (B) WAN

Explanation

A Wide Area Network covers large geographical areas such as cities or countries. A LAN covers a single building or campus.

Q66
Which of the following is a token-based protocol?
  1. ACSMA/CD
  2. BSlotted ring
  3. CBoth (a) and (b)
  4. DNone of the above
Show answerHide answer

Correct answer: (B) Slotted ring

Explanation

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.

Q67
The best suited hidden surface algorithm to deal with non-polygonal, non-planar surface patches is
  1. AZ-buffer algorithm
  2. BRay tracing algorithm
  3. CPainter's algorithm
  4. 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.

Q68
Raster images are commonly called
  1. APixmap
  2. BBitmap
  3. CBoth (a) and (b)
  4. DNone of the above
Show answerHide answer

Correct answer: (B) Bitmap

Explanation

Raster images are grids of pixels, commonly called bitmaps (a pixmap is the multi-bit-per-pixel form).

Q69
A scaling transformation changes the
  1. ASize of an object
  2. BLocation of an object
  3. CShape of an object
  4. DBoth (a) and (b)
Show answerHide answer

Correct answer: (A) Size of an object

Explanation

Scaling multiplies coordinates by scale factors, which changes the size of the object. Translation changes the location.

Q70
One of the disadvantages of pass by reference is that the called function may inadvertently corrupt the caller's data. This can be avoided by
  1. APassing pointers
  2. BDeclaring the formal parameters constant
  3. CDeclaring the actual parameters constant
  4. DAll of the above
Show answerHide answer

Correct answer: (B) Declaring the formal parameters constant

Explanation

Declaring the formal (reference) parameters as const lets the function read the caller's data without being able to modify it.

Q71
In C language
  1. AParameters are always passed by values
  2. BParameter are always passed by reference
  3. CNon-pointer variables are passed by value and pointers are passed by reference
  4. DParameters are alsways passed by value result
Show answerHide answer

Correct answer: (A) Parameters are always passed by values

Explanation

C supports only call by value. Even a pointer is passed by value (a copy of the address); call by reference is only simulated by using that address.

Q72
What does the following C statement mean? scanf ("%4s', str);
  1. ARead exactly 4 charaters from console
  2. BRead maximum 4 characters from console
  3. CRead a string in multiples of 4
  4. DNone of the above
Show answerHide answer

Correct answer: (B) Read maximum 4 characters from console

Explanation

A width in %4s limits input: scanf reads at most 4 non-whitespace characters into str. It may read fewer if whitespace comes first.

Q73
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]
  1. AI, II and IV only
  2. BII, III and IV only
  3. CII and IV only
  4. 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.

Q74
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; } }
  1. A1245
  2. B12345
  3. C12245
  4. 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.

Q75
A multimedia project is said to be ______ and user-interactive when users are give navigational control.
  1. ASecure
  2. BHypertext
  3. CLinear
  4. DNon-linear
Show answerHide answer

Correct answer: (D) Non-linear

Explanation

When users get navigational control and can move through the content in any order, the multimedia project is non-linear and interactive.

Q76
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 ______.
  1. A1000 bauds/sec, 4000 bps
  2. B1000 bauds/ sec, 500 bps
  3. C4000 bauds/ sec, 1000 bps
  4. 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.

Q77
When an ASP.NET file is placed on a an IIS server and viewed through a browser, the resulting HTML page contains?
  1. AA mix of ASP.NET and HTML code
  2. BAll ASP.NET code
  3. CAll HTML code
  4. DAs much ASP.NET code as is in the ASP.NET file
Show answerHide answer

Correct answer: (C) All HTML code

Explanation

ASP.NET code runs on the IIS server, and only the resulting HTML is sent to the browser. Viewing the page source shows pure HTML.

Q78
In C++, which of the following statements correctly returns the memory from the dynamic array pointer pp to the free store?
  1. Adelete pp;
  2. Bdelete pp [];
  3. Cdelete [] pp;
  4. Ddelete *pp;
Show answerHide answer

Correct answer: (C) delete [] pp;

Explanation

Memory allocated with new[] for an array must be freed with delete [] pp, so that the whole array is released and destructors run for every element.

Q79
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 :
  1. A5
  2. B2
  3. C3
  4. 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.

Q80
The number of bits require to represent decimal number 4096 in binary from is ______.
  1. A16
  2. B10
  3. C12
  4. D13
Show answerHide answer

Correct answer: (D) 13

Explanation

4096 = 2¹², which in binary is 1 followed by twelve 0s. That needs 13 bits (12 bits can go only up to 4095).

Q81
What is garbage collection in the context of Java?
  1. AThe Java Virtual Machine (JVM) checks the output of any Java program and deletes anything that does not make sense at all.
  2. BThe Operating System periodically deletes all of the Java files available on the system.
  3. CAny Java package imported in a program and not being used, is automatically deleted.
  4. DWhen all references to an object are gone, then the memory used by the object is automatically reclaimed.
Show answerHide answer

Correct answer: (D) When all references to an object are gone, then the memory used by the object is automatically reclaimed.

Explanation

Java's garbage collector automatically reclaims the memory of objects that are no longer referenced by any part of the program.

Q82
What is the full form of DTD that is used to describe content in an XHTML document?
  1. ADocument To Definition
  2. BDocument Type Definition
  3. CDocument Towards Definition
  4. DDocument Text Definition
Show answerHide answer

Correct answer: (B) Document Type Definition

Explanation

DTD stands for Document Type Definition. It defines the legal elements and attributes of an XML or XHTML document.

Q83
Which of the following protocol is used for transferring electronic mail messages from one machine to another?
  1. AHTTP
  2. BFTP
  3. CSMTP
  4. DSNMP
Show answerHide answer

Correct answer: (C) SMTP

Explanation

SMTP (Simple Mail Transfer Protocol) transfers e-mail between mail servers. HTTP is for web pages, FTP for files and SNMP for network management.

Q84
OLE, A Microsoft's component document technology, means :
  1. AOverlay Linking and Exchange
  2. BOnline Linking and Embedding
  3. COpen Learning Exchange
  4. DObject Linking and Embedding
Show answerHide answer

Correct answer: (D) Object Linking and Embedding

Explanation

OLE is Object Linking and Embedding, Microsoft's technology for linking or embedding objects from one application in a document of another.

Q85
If ⊕ represents XOR Gate in (Boolean algebra) and A ⊕ B = C, then B ⊕ C equals to:
  1. A1
  2. BA
  3. CA'
  4. D0
Show answerHide answer

Correct answer: (B) A

Explanation

B ⊕ C = B ⊕ (A ⊕ B) = A ⊕ (B ⊕ B) = A ⊕ 0 = A.

Q86
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.
  1. A(A + B').C' + D
  2. BA.B' + C'.D
  3. CA+B'.C'+D
  4. 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.

Q87
Which of the following is an invalid method/function in a Python dictionary?
  1. Apopitem ()
  2. Bremove ()
  3. Cget ()
  4. Dpop ()
Show answerHide answer

Correct answer: (B) remove ()

Explanation

Python dictionaries have pop(), popitem() and get(), but no remove() method. remove() belongs to lists and sets.

Q88
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?
  1. A₹4,20,000
  2. B₹4,40,000
  3. C₹4,60,000
  4. 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.

Q89
Opening cash balance is ₹6,00,000. Cash receipts are ₹2,50,000 and cash payments are ₹3,20,000. Calculate the closing cash balance.
  1. A₹5,30,000
  2. B₹5,50,000
  3. C₹4,80,000
  4. D₹6,70,000
Show answerHide answer

Correct answer: (A) ₹5,30,000

Explanation

Closing balance = opening + receipts − payments = 6,00,000 + 2,50,000 − 3,20,000 = ₹5,30,000.

Q90
Which course will be discontinued as per National Education Policy 2020?
  1. AM.Ed.
  2. BM.Phil.
  3. CPh.D.
  4. DEd.D
Show answerHide answer

Correct answer: (B) M.Phil.

Explanation

NEP 2020 states that the M.Phil. programme shall be discontinued.

Q91
Which stage of child development refers to the period of stress and storm?
  1. AInfant
  2. BAdolescence
  3. CAdulthood
  4. DChildhood
Show answerHide answer

Correct answer: (B) Adolescence

Explanation

Adolescence is called the period of "stress and storm" (G. Stanley Hall), because of rapid physical, emotional and social changes.

Q92
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?
  1. AMarginalization
  2. BEquality
  3. CFeminism
  4. 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.

Q93
Which of the following is not a field of learning?
  1. APsychomotor
  2. BSpiritual
  3. CCognitive
  4. DAffective
Show answerHide answer

Correct answer: (B) Spiritual

Explanation

Bloom's taxonomy describes three learning domains: cognitive, affective and psychomotor. Spiritual is not one of them.

Q94
Which of the following is not a factor in the influence of social culture on the development of the child ?
  1. ANuclear
  2. BExaminations
  3. CUrbanization
  4. 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.

Q95
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?
  1. AMarginalization
  2. BFeminism
  3. CStereotypes
  4. 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.

Q96
Which verb is used for evaluation in the cognitive clomain?
  1. ADefine
  2. BIdentify
  3. CDiscover
  4. DCriticism
Show answerHide answer

Correct answer: (D) Criticism

Explanation

Evaluation means judging or critiquing, so verbs such as criticise, judge and appraise belong to it. Define and identify are knowledge-level verbs.

Q97
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?
  1. APolitical
  2. BEconomic
  3. CSocial
  4. 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.

Q98
Which stage of child development refers to the period of gang age ?
  1. AAdulthood
  2. BInfancy
  3. CChildhood
  4. DAdolescence
Show answerHide answer

Correct answer: (C) Childhood

Explanation

Later childhood (about 6-12 years) is called the "gang age", because children like to form peer groups.

Q99
At which stage of child development does the child develop the ideas of honesty, empathy etc.
  1. AAdolescence
  2. BInfancy
  3. CAdulthood
  4. DChildhood
Show answerHide answer

Correct answer: (A) Adolescence

Explanation

Moral ideas such as honesty, empathy and idealism develop strongly in adolescence, along with abstract thinking.

Q100
At which stage of child development, the child becomes unreal?
  1. AAdulthood
  2. BChildhood
  3. CInfancy
  4. DAdolescence
Show answerHide answer

Correct answer: (D) Adolescence

Explanation

Adolescents tend to daydream and fantasise and to live in an imaginary, idealised world, so this stage is described as the child becoming "unreal".

Practise it as a real test

Reading answers is not the same as solving under time pressure. Attempt DSSSB TGT Computer Science Practice Set 1 online with the real 60-minute timer and marking scheme to get your score and all-India rank, or browse the other tests in the DSSSB TGT Computer Science Mock Test & Previous Year Papers.