Practice Set · Questions with answers

DSSSB TGT Computer Science Practice Set 4

All 100 questions of DSSSB TGT Computer Science Practice Set 4 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
The concatenation of two lists is to be performed in O(1) time. Which of the following implementations of lists could be used?
  1. ASingly linked list
  2. BDoubly linked list
  3. CCircular doubly linked list
  4. DArray implementation of list
Show answerHide answer

Correct answer: (C) Circular doubly linked list

Explanation

In a circular doubly linked list the last node is reached directly through head->prev. So two lists can be joined by changing a few pointers in O(1) time, without traversing.

Q2
Match List-I with List-II and select the correct answer using the codes given below the Lists: List-I A. All-pairs shortest path B. Quicksort C. Minimum weight spanning tree D. Connected components List-II 1. Greedy 2. Depth-first search 3. Dynamic programming 4. Divide and conquer Codes: A B C D
  1. A2 4 1 3
  2. B3 4 1 2
  3. C3 4 2 1
  4. D4 1 2 3
Show answerHide answer

Correct answer: (B) 3 4 1 2

Explanation

All-pairs shortest path (Floyd-Warshall) uses dynamic programming, quicksort uses divide and conquer, minimum spanning tree (Prim/Kruskal) is greedy, and connected components are found with DFS. That gives 3, 4, 1, 2.

Q3
Which of the following algorithms solves the all-pairs shortest path problem?
  1. ADijkstra's algorithm
  2. BFloyd's algorithm
  3. CPrim's algorithm
  4. DWarshall's algorithm
Show answerHide answer

Correct answer: (B) Floyd's algorithm

Explanation

Floyd's (Floyd-Warshall) algorithm finds shortest paths between every pair of vertices in O(V³). Dijkstra is single-source, Prim builds an MST, and Warshall finds transitive closure.

Q4
Which of the following sorting algorithms has the worst time complexity of nlog(n)?
  1. AHeapsort
  2. BQuicksort
  3. CInsertion sort
  4. DSelection sort
Show answerHide answer

Correct answer: (A) Heapsort

Explanation

Heapsort is O(n log n) even in the worst case. Quicksort's worst case is O(n²), and insertion and selection sort are O(n²).

Q5
Which of the following topologies gives highest reliability ?
  1. AMesh topology
  2. BBus topology
  3. CStar topology
  4. DRing topology
Show answerHide answer

Correct answer: (A) Mesh topology

Explanation

In a mesh topology every device has dedicated links to the others, so if one link fails, other paths remain. This makes it the most reliable topology.

Q6
What is the length of an IP address in bytes (Pre-IPv6) ?
  1. A8
  2. B1
  3. C2
  4. D4
Show answerHide answer

Correct answer: (D) 4

Explanation

An IPv4 address is 32 bits long, which is 4 bytes, usually written as four dotted decimal octets.

Q7
In a relational database model, cardinality of a relation means :
  1. AThe number of constraints
  2. BThe number of tuples
  3. CThe number of attributes
  4. DThe number of tables
Show answerHide answer

Correct answer: (B) The number of tuples

Explanation

Cardinality of a relation is its number of tuples (rows). Degree is its number of attributes (columns).

Q8
Conceptual level, Internal level and External level are three components of the three- level RDBMS architecture. Which of the following is not part of the conceptual level?
  1. AStorage dependent details
  2. BEntities, attributes, relationships
  3. CConstraints
  4. DSemantic information
Show answerHide answer

Correct answer: (A) Storage dependent details

Explanation

Storage-dependent details such as file organisation and indexes belong to the internal (physical) level. The conceptual level describes entities, attributes, relationships, constraints and semantics.

Q9
Which of the following represents the life-cycle of software development ?
  1. ADesign → Analysis → Coding → Operation and maintenance → Testing
  2. BAnalysis → Design → Coding → Testing → Operation and Maintenance
  3. CDesign → Analysis → Coding → Testing → Operation and Maintenance
  4. DAnalysis → Design → Coding → Operation and Maintenance → Testing
Show answerHide answer

Correct answer: (B) Analysis → Design → Coding → Testing → Operation and Maintenance

Explanation

The SDLC order is: analysis of requirements, design, coding, testing, then operation and maintenance.

Q10
Given that a 22-inch monitor with an aspect ratio of 16 : 9 has monitor resolution of 1920×1080, what is the width of the monitor ?
  1. A22 inches
  2. B8.53 inches
  3. C10.79 inches
  4. D19.17 inches
Show answerHide answer

Correct answer: (D) 19.17 inches

Explanation

Diagonal = 22 in and the ratio is 16:9, so the diagonal factor is √(16² + 9²) = √337 ≈ 18.36. Width = 22 × 16 ÷ 18.36 ≈ 19.17 inches.

Q11
Which of the following sorting algorithms uses recursion?
  1. AInsertion Sort
  2. BHeap Sort
  3. CMerge Sort
  4. DBubble Sort
Show answerHide answer

Correct answer: (C) Merge Sort

Explanation

Merge sort splits the array, recursively sorts each half and merges them. Insertion, bubble and heap sort are usually written iteratively.

Q12
Mechanism that is used to convert domain name into IP address is known as ______.
  1. AHTTP
  2. BURL
  3. CFTP
  4. DDNS
Show answerHide answer

Correct answer: (D) DNS

Explanation

DNS (Domain Name System) translates domain names such as example.com into IP addresses.

Q13
Which of the following statements best describes the main reasons for normalizing relational database? I. To Achieve physical data independence. II. To remove data anomalies (insertion. update, deletion, anomalies). III. To save space on disk.
  1. AI, II and III
  2. BI and II only
  3. CI and III only
  4. DII and III only
Show answerHide answer

Correct answer: (D) II and III only

Explanation

Normalization removes redundancy, which prevents insert, update and delete anomalies and saves storage space. It does not provide physical data independence, which comes from the three-level architecture.

Q14
A thread is also called :
  1. AA scheduler
  2. BA virtual process
  3. CA heavyweight process
  4. DA lightweight process
Show answerHide answer

Correct answer: (D) A lightweight process

Explanation

A thread is called a lightweight process. Threads of the same process share its code, data and files, so creating and switching between them costs little.

Q15
Anti-aliasing is important to improve the readability of text. It deals with the:
  1. AElimination of "jaggies".
  2. BSpacing between two individual characters.
  3. CUnderlining of letters.
  4. DSpacing of a group of characters.
Show answerHide answer

Correct answer: (A) Elimination of "jaggies".

Explanation

Anti-aliasing smooths the jagged, staircase edges ("jaggies") on diagonal lines and curves, including text characters, by blending edge pixels.

Q16
Consider a set of n tasks with known runtimes r1, r2 ........ rn, to be run on a uniprocessor machine, Which of the following processor scheduling algorithm will result in the maximum throughput.
  1. APriority scheduling
  2. BRound-robin
  3. CFCFS
  4. DShortest job first
Show answerHide answer

Correct answer: (D) Shortest job first

Explanation

Shortest Job First runs the shortest tasks first, so the most jobs finish in a given time. It gives maximum throughput and minimum average waiting time.

Q17
Consider the following dictionary: Num = {10 : 'Ten', 100 : 'Hundred', 10: 'Decimal'} What shall be the output of print (Num)?
  1. A{10 : 'Ten', 100 : 'Hundred', 10 : 'Decimal'}
  2. B{10 : 'Ten', 100 : 'Hundred'}
  3. C{10 : 'Decimal', 100 : 'Hundred'}
  4. DError
Show answerHide answer

Correct answer: (C) {10 : 'Decimal', 100 : 'Hundred'}

Explanation

Dictionary keys must be unique. The second 10 overwrites the first value but keeps the key's original position, giving {10: 'Decimal', 100: 'Hundred'}.

Q18
Identify the term, which is an unauthorized real-time interception or monitoring of private communication between two entities over a network.
  1. AEavesdropping
  2. BPhishing
  3. CSnooping
  4. DCyberstalking
Show answerHide answer

Correct answer: (A) Eavesdropping

Explanation

Eavesdropping is secretly intercepting or listening to private communication in real time over a network without permission.

Q19
Which of the following method is used to move the file pointer to read the content from a specific position in a text file inside a Python program?
  1. AMove
  2. BTell
  3. CFind
  4. DSeek
Show answerHide answer

Correct answer: (D) Seek

Explanation

seek(offset) moves the file pointer to a given position. tell() only reports the current position.

Q20
Which out of the following mode is required to be used while opening a binary file to allow read as well as write operations in a Python program?
  1. Aab
  2. Bwb
  3. Cr+
  4. Drb+
Show answerHide answer

Correct answer: (D) rb+

Explanation

'rb+' opens an existing binary file for both reading and writing. 'r+' is the text-mode version, and 'wb'/'ab' only write or append.

Q21
What is the purpose of the legend() function in Matplotlib?
  1. ATo add a title to a plot
  2. BTo add annotations to a plot
  3. CTo label different lines or markers on a plot
  4. DTo label the x and y axes of a plot
Show answerHide answer

Correct answer: (C) To label different lines or markers on a plot

Explanation

legend() adds a legend box that labels each line or marker on the plot, using the label= values given when plotting.

Q22
Which command in MySQL is used to list all (non-temporary) tables in a given database?
  1. ADESCRIBE TABLES
  2. BDISPLAY TABALES
  3. CVIEW TABLES
  4. DSHOW TABLES
Show answerHide answer

Correct answer: (D) SHOW TABLES

Explanation

SHOW TABLES lists all the non-temporary tables in the current MySQL database.

Q23
As per NEP 2020, from which class will vocational education be introduced?
  1. AClass 7
  2. BClass 8
  3. CClass 9
  4. DClass 6
Show answerHide answer

Correct answer: (D) Class 6

Explanation

NEP 2020 introduces vocational education from Class 6, including internships, so every student learns at least one vocation.

Q24
Which approach of learning out of the following, engages participants in activity, leads them to reflect on their activity critically and obtain useful insight and learning?
  1. ACollaboration
  2. BPassive learning
  3. CObservation
  4. DExperiential learing
Show answerHide answer

Correct answer: (D) Experiential learing

Explanation

Experiential learning (Kolb) is learning by doing: learners take part in an activity, reflect on it critically, and draw insights they can apply.

Q25
Which of the following is not a valid variable name in JavaScript ?
  1. ANumber10
  2. B_myNumber
  3. C10Number
  4. Dmy_Number
Show answerHide answer

Correct answer: (C) 10Number

Explanation

JavaScript identifiers cannot start with a digit, so 10Number is invalid. Names can start with a letter, _ or $.

Q26
The style definitions are normally saved in external files that have the extension as :
  1. A.html
  2. B.css
  3. C.js
  4. D.stl
Show answerHide answer

Correct answer: (B) .css

Explanation

External style sheets are saved with the .css extension and linked to HTML pages with the <link> tag.

Q27
A binary search tree with N integers may have height ______ in the best case, and ______ in the worst case.
  1. AO(N), O(N)
  2. BO(N²), N
  3. CO(log₂N), O(N²)
  4. DO(log₂N), N−1
Show answerHide answer

Correct answer: (D) O(log₂N), N−1

Explanation

A balanced BST has height O(log₂N). If keys are inserted in sorted order the tree becomes a chain with height N−1.

Q28
Intellectual Property Rights (IPR) protect the use of information and ideas that are of:
  1. ATraditional value
  2. BHistorical value
  3. CCommercial value
  4. DEthical value
Show answerHide answer

Correct answer: (C) Commercial value

Explanation

IPR protects creations of the mind, such as inventions, designs and brands, that have commercial value, giving the creators exclusive rights to use them.

Q29
What will be the result of the following expression? 3−(−3−3)−3
  1. A6
  2. B0
  3. C−3
  4. D3
Show answerHide answer

Correct answer: (A) 6

Explanation

3 − (−3 − 3) − 3 = 3 − (−6) − 3 = 3 + 6 − 3 = 6.

Q30
Which of the following operations have the highest level of precedence?
  1. A( )
  2. B+ −
  3. C* /
  4. D^ (exponentiation)
Show answerHide answer

Correct answer: (D) ^ (exponentiation)

Explanation

Among the arithmetic operators, exponentiation (^) has the highest precedence, above * and /, which are above + and −. Parentheses are grouping symbols, not operations.

Q31
Which topologies of networks is represented in the following diagram ? Diagram: a main cable with two computers attached to it branches out into three separate cables (lines); each branch cable has several computers attached to it (4 on the upper branch, 5 on the middle branch, 3 on the lower branch).
  1. ABUS
  2. BRING
  3. CSTAR
  4. DTREE
Show answerHide answer

Correct answer: (D) TREE

Explanation

Several bus segments branch out from a main backbone cable, making a hierarchy of buses. This is a tree topology.

Q32
Identify the error in the following HTML code: <HTML> <BODY> <FORM ID = "FORM1" METHOD = POST> <BR> SELECT YOUR FAVOURITE CHANNEL : NETFLIX <INPUT TYPE = CHECKSELECT> AMAZON PRIME <INPUT TYPE = CHECKSELECT> </FORM> </BODY> </HTML> (a) NAME instead of ID and CHECKBOX instead of CHECKSELECT. (b) METHOD = GET instead of POST.
  1. AOnly (a) is correct
  2. BBoth (a) and (b) are correct
  3. COnly (b) is correct
  4. DThe code is correct and has no errors
Show answerHide answer

Correct answer: (A) Only (a) is correct

Explanation

Form controls need a NAME attribute to be submitted, and the input type for tick boxes is CHECKBOX. CHECKSELECT does not exist. METHOD = POST is valid, so only (a) is correct.

Q33
The ______ attribute of the <A> tag is used to specify the Section names while creating an internal link.
  1. AHREF
  2. BID
  3. CACTION
  4. DNAME
Show answerHide answer

Correct answer: (D) NAME

Explanation

In older HTML an internal link target is made with <A NAME="section">, and you link to it with <A HREF="#section">.

Q34
Select the correct output of the following C++ program segment assuming all necessary header files are correctly included. void main () { char *S = "Inheritance"; S +=6 ; cout<<S<< endl; }
  1. Aitence
  2. Btance
  3. CTence
  4. DInheri
Show answerHide answer

Correct answer: (B) tance

Explanation

S points to "Inheritance". S += 6 moves it to index 6 (I0 n1 h2 e3 r4 i5 t6), so cout prints "tance".

Q35
This question is based on the following C++ code segment and class FUN : class FUN class FUN { int CODE ; public : FUN ( ); //Function1 FUN (int C); //Function2 FUN (FUN & F); //Function3 void DISP ( ); //Function4 ~FUN ( ); //Function5 }; void main ( ) { FUN F1 ; ______ // BLANK ______ ______} Which of the following is an example of default constructor?
  1. AFunction 1
  2. BFunction 2
  3. CFunction 3
  4. DFunction 5
Show answerHide answer

Correct answer: (A) Function 1

Explanation

A default constructor takes no arguments, so FUN() (Function 1) is the default constructor. FUN(int) is parameterized, FUN(FUN&) is the copy constructor, and ~FUN() is the destructor.

Q36
Which of the following is depicted from the flowchart shown below? Flowchart (top to bottom, one straight path): P=1000 → R=10 → T=2 → SI=P*R*T/100 → PRINT SI
  1. ASequencing
  2. BBranching
  3. CLooping
  4. DOverloading
Show answerHide answer

Correct answer: (A) Sequencing

Explanation

The flowchart runs straight from top to bottom with no decisions or loops, which is sequencing (sequential control flow).

Q37
Assume the values of X, Y and Z variables are assigned with values as −10, 20 and −30 respectively find out, which of following expression will evaluate to true ?
  1. AX > Z and Y >= Z
  2. BX > Y and X <= Z
  3. CX >= Z and Z <= Y
  4. DY <= X and Z <= Y
Show answerHide answer

Correct answer: (A) X > Z and Y >= Z

Explanation

Answer as per the book's key (a). Note that option (c) also evaluates to true for these values.

Q38
In order to add a new column to an existing table in SQL, we can use the command
  1. AMODIFY TABLE
  2. BEDIT TABLE
  3. CALTER TABLE
  4. DALTER COLUMNS
Show answerHide answer

Correct answer: (C) ALTER TABLE

Explanation

ALTER TABLE ... ADD column_name datatype adds a new column to an existing table. MODIFY TABLE and EDIT TABLE are not SQL commands.

Q39
Which of the following search algorithm requires a sorted array ?
  1. ALinear search
  2. BHash search
  3. CBinary search
  4. DAll of these
Show answerHide answer

Correct answer: (C) Binary search

Explanation

Binary search repeatedly halves the search range by comparing with the middle element, which only works if the array is sorted. Linear search works on unsorted data.

Q40
With an IP address of 100, you currently have 80 subnets. What subnet mask should you use to maximize the number of available hosts ?
  1. A192
  2. B224
  3. C248
  4. D252
Show answerHide answer

Correct answer: (D) 252

Explanation

Note: the answer key gives (D) 252, but 252 adds only 6 subnet bits (64 subnets). 80 subnets need 7 bits (2⁷ = 128), which makes the octet 254 (255.254.0.0 for network 100). The question is garbled.

Q41
The ______ houses the switches in token ring.
  1. ATransceiver
  2. BNine-pin connector
  3. CMAU
  4. DNIC
Show answerHide answer

Correct answer: (C) MAU

Explanation

In Token Ring, the MAU (Multistation Access Unit) is the hub-like device that houses the switches and connects the stations into a logical ring.

Q42
A program is a/an ______ entity.
  1. AActive
  2. BPassive
  3. CDormant
  4. DHyperactive
Show answerHide answer

Correct answer: (B) Passive

Explanation

A program is a passive entity, just code stored on disk. A process is an active entity, a program in execution.

Q43
The diagram given below represents Diagram: Processes enter a 'ready queue' which feeds the 'CPU'; an arrow leaves the CPU (exit). From the CPU, four paths lead back to the ready queue: 1. I/O request → I/O queue → I/O → back to ready queue 2. time slice expired → back to ready queue 3. fork a child → child executes → back to ready queue 4. wait for an interrupt → interrupt occurs → back to ready queue
  1. AProcess creation
  2. BProcess state
  3. CQueuing diagram
  4. DCommunication model
Show answerHide answer

Correct answer: (C) Queuing diagram

Explanation

The diagram shows the ready queue, the I/O queues and the events that move a process between them. This is the queueing diagram of process scheduling.

Q44
The figure below represents a Figure: an arrow points to a root node R; R has two arrows going down, one to a triangle (subtree) labelled A on the left and one to a triangle (subtree) labelled B on the right.
  1. ABinary tree
  2. BRecursive tree
  3. CInsert sort
  4. DUnitary tree
Show answerHide answer

Correct answer: (A) Binary tree

Explanation

The figure shows a root with a left subtree A and a right subtree B. This is the recursive definition of a binary tree.

Q45
The command used to see the fields of the table alongwith their datatypes in SQL is
  1. ASelect fields from dual where table = "MANAGER";
  2. BSelect field_names, datatype from dual where table_ name = "MANAGER";
  3. CDesc MANAGER;
  4. DSelect description from dual where table_ name = "MANAGER";
Show answerHide answer

Correct answer: (C) Desc MANAGER;

Explanation

DESC (DESCRIBE) table_name shows the table's columns with their data types and constraints.

Q46
Consider an arbitrary number system with the independent digits as 0, 1 and X. What is the radix of this number system ?
  1. A1
  2. B2
  3. C3
  4. D4
Show answerHide answer

Correct answer: (C) 3

Explanation

The radix (base) of a number system equals its number of distinct digits. 0, 1 and X are three digits, so the radix is 3.

Q47
The following diagram shows a Diagram: inputs A and B enter an XOR-shaped gate that has an inversion bubble at its output; output Y = (A⊕B)'.
  1. AExclusive-Nor gate
  2. BNAND gate
  3. CAND gate
  4. DOR gate
Show answerHide answer

Correct answer: (A) Exclusive-Nor gate

Explanation

An XOR gate with an inverting bubble at the output computes (A⊕B)', which is the Exclusive-NOR gate.

Q48
Consider the following statements : S1 : a small page size causes large page tables, S2 : internal fragmentation is increaseked with small pages. S3 : I/O transfers are more efficient with large pages. Which of the following is true?
  1. AS1 is true and S3 is false
  2. BS1 and S2 are true
  3. CS2 and S3 are true
  4. DS1 is true and S2 is false
Show answerHide answer

Correct answer: (D) S1 is true and S2 is false

Explanation

S1 is true, because small pages mean more pages and so bigger page tables. S2 is false, because small pages reduce internal fragmentation. S3 is true, because large pages make I/O more efficient. So the statement "S1 is true and S2 is false" holds.

Q49
The addressing mode used in an instruction of the form ADD X, Y is :
  1. AIndex
  2. BAbsolute
  3. CImmediate
  4. DIndirect
Show answerHide answer

Correct answer: (B) Absolute

Explanation

In ADD X, Y the operands are given by their memory addresses directly in the instruction. This is absolute (direct) addressing.

Q50
Assume X and Y are non-zero positive integers. Consider the following pseudo-code fragment: while X<>Y do if X>Y then X ← X−Y else Y ← Y−X endif end while print (X) What is the code doing?
  1. AIt computes the GCD of two numbers.
  2. BIt computes the LCM of two numbers.
  3. CIt finds the smallest of two numbers.
  4. DIt divides the largest number by the smaller.
Show answerHide answer

Correct answer: (A) It computes the GCD of two numbers.

Explanation

Subtracting the smaller number from the larger until both are equal is Euclid's subtraction method, so the final X is the GCD.

Q51
The Boolean expression (A + C) (AB' + AC) ((AC)' + B') can be simplified as :
  1. AA'B + BC
  2. BAB'
  3. CAB + BC
  4. DAB + A'C
Show answerHide answer

Correct answer: (B) AB'

Explanation

(A + C)(AB' + AC) = A(B' + C). Multiplying by (A' + B' + C') gives A(B' + C)(B' + C') = AB', because (B' + C)(B' + C') = B'.

Q52
Which of the following is not a program control instruction ?
  1. ACMP
  2. BMOV
  3. CJMP
  4. DCALL
Show answerHide answer

Correct answer: (B) MOV

Explanation

MOV only transfers data. JMP and CALL change the flow of control, and CMP sets flags for conditional branching, so these are grouped with program control.

Q53
Based on the current technology, ______ is the fastest logic family.
  1. ACMOS
  2. BTTL
  3. CMOS
  4. DECL
Show answerHide answer

Correct answer: (D) ECL

Explanation

ECL (Emitter Coupled Logic) is the fastest logic family because its transistors never saturate, giving very small propagation delays.

Q54
Recursive procedures is implement using:
  1. AString
  2. BQueue
  3. CStack
  4. DLinked List
Show answerHide answer

Correct answer: (C) Stack

Explanation

Each recursive call pushes its local variables and return address onto a stack, and they are popped when the call returns.

Q55
For a tree with just one node, the root node is the height of a binary tree is defined to zero; if there are 2 levels of nodes, the height is 1 and so on. A Binary Search Tree is built according to the usual rules with the following six key inserted one at a time as given : B, I, N, A, R, Y. What is the height of the tree?
  1. A5
  2. B2
  3. C3
  4. D4
Show answerHide answer

Correct answer: (D) 4

Explanation

Inserting B, I, N, A, R, Y: I goes right of B, N right of I, A left of B, R right of N, Y right of R. The longest path B-I-N-R-Y has 4 edges, so the height is 4.

Q56
Which of the following methods in Java Script will display a window having a dialog box with a specified message, along with an OK and CANCEL button as options?
  1. Aprompt ()
  2. Balert ()
  3. Cconfirm ()
  4. Drequest ()
Show answerHide answer

Correct answer: (C) confirm ()

Explanation

confirm() shows a dialog with a message and OK and Cancel buttons. alert() has only OK, and prompt() asks for text input.

Q57
To declare the version of XML. the correct syntax is :
  1. A</xml version = '1.0'/>
  2. B<?xml version = "1.0"/>
  3. C<*xml version = '1.0'/>
  4. D<?xml version = 1.0"/>
Show answerHide answer

Correct answer: (B) <?xml version = "1.0"/>

Explanation

The XML declaration starts with <?xml and gives the version in quotes, for example <?xml version="1.0"?>. Option (B) is the closest to this syntax.

Q58
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 goes from base to derived: members of 'point' are inherited into 'circle', not the other way round. So (D) is false.

Q59
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. Java does not allow a size inside the declaration brackets, as in int array[4][5].

Q60
Which of the following is the correct declaration of linked list?
  1. AStruct node* { int data; node * link; }
  2. BStruct node { int data; struct node* link; }
  3. CStruct node { int data; node link; }
  4. DStruct node* { int data; struct node* link; }
Show answerHide answer

Correct answer: (B) Struct node { int data; struct node* link; }

Explanation

A self-referential structure has a pointer to its own type: struct node { int data; struct node *link; };. A member of type node itself would be infinitely recursive.

Q61
Consider the relation Emp-Dept with SSn as key. Ename | SSn (key) | EAddr | Dept. No. | Dept. Name | Dept. Manager | SSn Which of the following is (are) invalid operations (s)? (i) Inserting an employee without name and address. (ii) Inserting an employee with only SSn. (iii) Inserting a department with no employee. (iv) Inserting an employee without SSn.
  1. A(i)
  2. B(iv)
  3. C(iii) and (iv)
  4. D(ii) and (iii)
Show answerHide answer

Correct answer: (B) (iv)

Explanation

SSn is the primary key, and by entity integrity a key cannot be null. So inserting an employee without an SSn is invalid. Name and address may be null.

Q62
Which of the following is a special effect in motion pictures and animations that changes one image/picture into another through a seamless transition?
  1. AModeling
  2. BMorphing
  3. CAnimating
  4. DWrapping
Show answerHide answer

Correct answer: (B) Morphing

Explanation

Morphing smoothly transforms one image into another through a seamless series of in-between frames.

Q63
Consider the following Java code segment: public class while /* line 1*/ { public void loop ( ) { int x = 0; While (1)/* line-6*/ { system. out. println("x plus one is" + (x+1)): } } } Which of the following is true ?
  1. AThere is a syntax error in line-1
  2. BThere are syntax errors in line- 1 and line- 6
  3. CThere is a syntax error in line- 6
  4. DNo syntax error
Show answerHide answer

Correct answer: (A) There is a syntax error in line-1

Explanation

while is a reserved keyword in Java, so it cannot be used as a class name. "public class while" is a syntax error on line 1.

Q64
In the context of while loop and do-while loop in C++, which of the following is not true?
  1. ABoth the loops are repetitive in nature
  2. BBoth are conditional loops
  3. CBoth will be executed at least once
  4. DBoth are terminated when the condition becomes false.
Show answerHide answer

Correct answer: (C) Both will be executed at least once

Explanation

A do-while loop always runs at least once because it checks the condition after the body. A while loop may run zero times, so (C) is not true.

Q65
Which of the following is not correct in C++?
  1. Ax−=2; is the same as x = x−2;
  2. Bx*= 2; is the same as x = x*2;
  3. Cx% =2; is the same as x = x/2;
  4. Dx/=2; is the same as x = x/2;
Show answerHide answer

Correct answer: (C) x% =2; is the same as x = x/2;

Explanation

x %= 2 means x = x % 2 (remainder), not x = x / 2 (division). So (C) is incorrect.

Q66
Run-time polymorphism is achieved by ______.
  1. AFriend function
  2. BVirtual function
  3. COperator overloading
  4. DFunction overloading
Show answerHide answer

Correct answer: (B) Virtual function

Explanation

Virtual functions give run-time (dynamic) polymorphism: the function called is chosen at run time from the object's actual type. Overloading is resolved at compile time.

Q67
Hardware mechanism that enables a device to notify the CPU is called:
  1. ABusy-waiting
  2. BInterrupt
  3. CPolling
  4. DDMA
Show answerHide answer

Correct answer: (B) Interrupt

Explanation

An interrupt is a hardware signal that a device sends to the CPU to request attention. Polling and busy-waiting are software checks made by the CPU.

Q68
The address resolution protocol (ARP) is used for
  1. AFinding the IP address from DNS
  2. BFinding the IP address of the default gateway
  3. CFinding the IP address that corresponds to a MAC address
  4. DFinding the MAC address that corresponds to an IP address
Show answerHide answer

Correct answer: (D) Finding the MAC address that corresponds to an IP address

Explanation

ARP maps a known IP address to the matching MAC (hardware) address on a local network. RARP does the reverse.

Q69
The number of crosspoints needed for 10 lines in a crosspoint switch, which is full duplex in nature and there is no self-connection, is
  1. A100
  2. B45
  3. C50
  4. D90
Show answerHide answer

Correct answer: (B) 45

Explanation

With full-duplex lines and no self-connection, each pair of lines needs one crosspoint. So the count is n(n−1)/2 = 10 × 9 / 2 = 45.

Q70
In Huffman's coding, if the symbol A has probability 0.3, B has probability 0.15, C has probability 0.1, D has probability 0.25 and E has probability 0.2, then the minimum number of bits required to represent all the symbols together is
  1. A14
  2. B11
  3. C12
  4. D15
Show answerHide answer

Correct answer: (C) 12

Explanation

Huffman merges: 0.1 + 0.15 = 0.25, then 0.2 + 0.25 = 0.45, then 0.25 + 0.3 = 0.55, then 1. The code lengths are A 2, D 2, E 2, B 3, C 3, totalling 2 + 2 + 2 + 3 + 3 = 12 bits.

Q71
X.21 is
  1. AA method of determining which device has access to the transmission medium at any time
  2. BA method access control technique or multiple access transmission media
  3. CVery common but oriented at linked protocol issued to ISO
  4. DA network access standard for connecting stations to a circuit switch network
Show answerHide answer

Correct answer: (D) A network access standard for connecting stations to a circuit switch network

Explanation

X.21 is an ITU-T standard interface for connecting stations (DTE) to circuit-switched digital networks.

Q72
Which of the following activities does not belong to implementation phase of SDLC?
  1. AProgram testing
  2. BFile conversion
  3. CUser training
  4. DNew changes to the system
Show answerHide answer

Correct answer: (D) New changes to the system

Explanation

New changes to the system belong to maintenance. Testing, file conversion and user training are done in the implementation phase.

Q73
Project risk factor is considered in
  1. AWaterfall model
  2. BPrototyping model
  3. CSpiral model
  4. DIterative enhancement model
Show answerHide answer

Correct answer: (C) Spiral model

Explanation

Boehm's spiral model explicitly analyses project risks in every cycle (a risk analysis quadrant), unlike the waterfall or prototyping models.

Q74
According to PUTNAM, the project effort is inversely proportional to the fourth power of the development time. Doubling the development schedule for a 100 Person-Month (PM) project would reduce the project effort to
  1. A50 PM
  2. B7.16 PM
  3. C25 PM
  4. D6.25 PM
Show answerHide answer

Correct answer: (D) 6.25 PM

Explanation

Effort ∝ 1/t⁴, so doubling the time divides effort by 2⁴ = 16: 100 ÷ 16 = 6.25 PM.

Q75
In virtual memory paging, page size and frame size have which of the following relations?
  1. ABoth are of equal size
  2. BBoth are of unequal size
  3. CThe page size is exactly half of the frame size
  4. DThe page size is twice the frame size
Show answerHide answer

Correct answer: (A) Both are of equal size

Explanation

In paging, logical memory is divided into pages and physical memory into frames of the same size, so any page fits into any frame.

Q76
Which of the following is tautology?
  1. Aa ∨ b → b ∧ c
  2. Ba ∧ b → b ∨ c
  3. Ca ∨ b → (b → c)
  4. DNone of the above
Show answerHide answer

Correct answer: (B) a ∧ b → b ∨ c

Explanation

a ∧ b → b ∨ c is a tautology: whenever a ∧ b is true, b is true, so b ∨ c is true. The other implications can be false, for example when b and c are false.

Q77
From a complete graph by removing maximum ______ edges, we can construct a spanning tree.
  1. Ae − n + 1
  2. Bn − e + 1
  3. Cn + e − 1
  4. De − n − 1
Show answerHide answer

Correct answer: (A) e − n + 1

Explanation

A spanning tree of n vertices keeps exactly n − 1 edges. So from a graph with e edges you remove e − (n − 1) = e − n + 1 edges.

Q78
In how many ways can 8 Indians, 4 Americans and 4 Englishmen be seated in a row so that all persons of same nationality sit together?
  1. A3! 4! 8! 4!
  2. B3! 8!
  3. C4! 4!
  4. D8! 4! 4!
Show answerHide answer

Correct answer: (A) 3! 4! 8! 4!

Explanation

Treat each nationality as one block: the 3 blocks can be arranged in 3! ways. Inside the blocks, Indians arrange in 8!, Americans in 4! and Englishmen in 4!. Total = 3!·8!·4!·4!.

Q79
The total number of words formed by 2 vowels and 3 consonants taken from 4 vowels and 5 consonants is
  1. A60
  2. B120
  3. C7200
  4. DNone of the above
Show answerHide answer

Correct answer: (C) 7200

Explanation

Choose the vowels: C(4,2) = 6. Choose the consonants: C(5,3) = 10. Arrange the 5 letters: 5! = 120. Total = 6 × 10 × 120 = 7200.

Q80
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 on each comparison, and 32 = 2⁵, so it needs about log₂32 = 5 comparisons (the keyed value).

Q81
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 hex = 0001 0011 0010 1010 in binary. Regrouping in threes from the right gives 1 001 100 101 010, which is 11452 in octal.

Q82
In a positive edge triggered Jk flip-flop, a low J and a low K produces :
  1. ANo change
  2. BLow state
  3. CHigh state
  4. DToggle state
Show answerHide answer

Correct answer: (A) No change

Explanation

In a JK flip-flop, J = 0 and K = 0 is the hold condition, so the output does not change at the clock edge.

Q83
An entity set that does not have sufficient attributes to form a key is termed as :
  1. APrimary entity set
  2. BStrong entity set
  3. CWeak entity set
  4. DSimple entity set
Show answerHide answer

Correct answer: (C) Weak entity set

Explanation

A weak entity set has no primary key of its own. It is identified through a strong (owner) entity set plus its partial key (discriminator).

Q84
How many gate (s) would be required to implement the following boolean expression after simplification? Expression : AC+ABC
  1. A4
  2. B1
  3. C2
  4. D3
Show answerHide answer

Correct answer: (B) 1

Explanation

AC + ABC = AC(1 + B) = AC, so a single 2-input AND gate is enough.

Q85
What do data warehouses support?
  1. AOperational databases
  2. BOLAP
  3. COLTP
  4. DOLAP and OLTP
Show answerHide answer

Correct answer: (B) OLAP

Explanation

Data warehouses store historical, integrated data for analysis, so they support OLAP (Online Analytical Processing). OLTP runs on operational databases.

Q86
The memory which does not loose its content on failure of power supply is known as ______ memory.
  1. AMain memory
  2. BVolatile
  3. CNon-volatile
  4. DRAM
Show answerHide answer

Correct answer: (C) Non-volatile

Explanation

Non-volatile memory, such as ROM or flash, keeps its contents when power is lost. RAM (main memory) is volatile.

Q87
The easiest method in Flash to draw a heptagon, is to use the ______.
  1. APolystar Tool with the "Polygon" style.
  2. BPolygon Tool.
  3. CLasso Tool with the "Create star" option.
  4. DPolystar Tool with the "Star" style.
Show answerHide answer

Correct answer: (A) Polystar Tool with the "Polygon" style.

Explanation

The PolyStar tool with the Polygon style, set to 7 sides in its options, draws a heptagon directly. Flash has no separate Polygon tool.

Q88
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

In postfix evaluation, operands are pushed onto a stack. Each operator pops its operands and pushes the result back.

Q89
Which of the following is a current liability?
  1. AMachinery
  2. BDebtors
  3. COutstanding Salary
  4. DFurniture
Show answerHide answer

Correct answer: (C) Outstanding Salary

Explanation

Outstanding salary is an expense due but not yet paid, payable within the year, so it is a current liability. Machinery and furniture are fixed assets, and debtors are current assets.

Q90
Which financial statement shows the financial position of a business on a particular date?
  1. ATrial Balance
  2. BProfit and Loss Account
  3. CBalance Sheet
  4. DCash Book
Show answerHide answer

Correct answer: (C) Balance Sheet

Explanation

The balance sheet shows the assets, liabilities and capital of a business on a particular date, so it shows the financial position on that date.

Q91
Which of the following is called the magna carta of English education in India ?
  1. AKothari commission
  2. BNational policy on education 1986
  3. CWood's dispatch
  4. DRight to education act, 2009
Show answerHide answer

Correct answer: (C) Wood's dispatch

Explanation

Wood's Despatch (1854) laid down a full plan for English education in India, so it is called the Magna Carta of English education in India.

Q92
Tina understands the concepts of addition in school, on her way back home she buys some refreshments and calculates the expenses herself. Which component of the curriculum has been highlighted in the above statement?
  1. AValues
  2. BConcept
  3. CApplication
  4. DSubject
Show answerHide answer

Correct answer: (C) Application

Explanation

Tina uses the concept of addition in a real-life situation (shopping), which shows the application component of the curriculum.

Q93
Which of the following is not a learning disability ?
  1. AVisual impairment
  2. Bdysgraphia
  3. CDyslexia
  4. DDyscalculia
Show answerHide answer

Correct answer: (A) Visual impairment

Explanation

Visual impairment is a sensory disability, not a learning disability. Dysgraphia (writing), dyslexia (reading) and dyscalculia (mathematics) are learning disabilities.

Q94
Which ministry conducts the sarva shiksha abhiyan?
  1. AMinistry of commerce and industry
  2. BMinistry of women and child development
  3. CMinistry of cooperatives
  4. DHuman resource development ministry
Show answerHide answer

Correct answer: (D) Human resource development ministry

Explanation

Sarva Shiksha Abhiyan was run by the Ministry of Human Resource Development (now the Ministry of Education).

Q95
What do you understand by dysgraphia?
  1. AAttention - deficit
  2. BDifficulties with spelling and /or trouble writing thoughts on paper
  3. CDifficulty in reading
  4. DUnable to perform number based operations
Show answerHide answer

Correct answer: (B) Difficulties with spelling and /or trouble writing thoughts on paper

Explanation

Dysgraphia is a learning disability that affects writing: poor handwriting, spelling and difficulty putting thoughts on paper.

Q96
Which amendment of the constitution of India made the right to education a fundamental right ?
  1. A75
  2. B41
  3. C79
  4. D86
Show answerHide answer

Correct answer: (D) 86

Explanation

The 86th Amendment Act, 2002 added Article 21A, making free and compulsory education for children aged 6 to 14 a fundamental right.

Q97
If a child is suffering from dyslexia, the teacher should adopt the following remedial strategy.
  1. Ahelping them to develop their listening skills by tracking the words provided from the audio book / recorded study material / materials
  2. BContinuing the learning process without any modifications
  3. CProviding counting materials such as counters, rulers, etc
  4. DDoing physical exercises showing the directions like left and right
Show answerHide answer

Correct answer: (A) helping them to develop their listening skills by tracking the words provided from the audio book / recorded study material / materials

Explanation

Children with dyslexia struggle with reading text. Audio books and recorded material help them learn by listening while they follow the words.

Q98
In the teaching plan of any subjects, planning lessons according to the timetable using transactional strategies and using appropriate media means-
  1. AImplementation of curriculum
  2. BMeaning of curriculum
  3. CBenefits of curriculum
  4. DAspects of curriculum
Show answerHide answer

Correct answer: (A) Implementation of curriculum

Explanation

Putting the curriculum into practice through timetabled lesson plans, teaching strategies and suitable media is curriculum implementation.

Q99
Which university was established after wood's despatch?
  1. ALucknow
  2. BBihar
  3. CDelhi
  4. DCalcutta
Show answerHide answer

Correct answer: (D) Calcutta

Explanation

Following Wood's Despatch (1854), universities were set up in 1857 at Calcutta, Bombay and Madras.

Q100
A teacher can respond to the interests of children with special needs by following :
  1. ABeing aware of the individual differences of students and creating personalized learning materials
  2. BIgnoring individual differences
  3. CMake them sit separately in the classroom so that they do not mix other children
  4. DAsking other students to address them as underprivileged and express sympathy
Show answerHide answer

Correct answer: (A) Being aware of the individual differences of students and creating personalized learning materials

Explanation

Inclusive teaching means recognising individual differences and adapting or personalising learning materials. It does not mean ignoring, isolating or pitying children with special needs.

Practise it as a real test

Reading answers is not the same as solving under time pressure. Attempt DSSSB TGT Computer Science Practice Set 4 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.