DSSSB TGT / PGT · Topic-wise previous year questions

Computer Science Previous Year Questions

1995 Computer Science questions asked in DSSSB TGT / PGT previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.

  • 1995 questions
  • 19 topics
  • Official answer key
  • Free

Practise by topic

Q1From DSSSB TGT Computer Science Practice Set 5
Name the tag and the attribute to be used to change the sequence of the list items in an ordered list from numbers to upper case letters
  1. ATag-<OL>, Attribute - START
  2. BTag-<OL>, Attribute - VALUE
  3. CTag-<OL>, Attribute - TYPE
  4. DTag-<OL>, Attribute - CASE
Show answerHide answer

Correct answer: (C) Tag-<OL>, Attribute - TYPE

Explanation

The TYPE attribute of <OL> sets the numbering style; TYPE="A" gives upper-case letters (A, B, C...). START only sets the starting value, and VALUE belongs to <LI>.

Q2From DSSSB TGT Computer Science Practice Set 5
Which of the following file stream function will move the file pointer to Nth record in a binary file F created with the help of objects of class EMP?
  1. AF.tellg(N)
  2. BF.seekp(N)
  3. CF.seekp((N−1)* sizeof(EMP))
  4. DF.seekp(sizeof(EMP)/N)
Show answerHide answer

Correct answer: (C) F.seekp((N−1)* sizeof(EMP))

Explanation

Records are stored one after another, so the Nth record begins after N−1 records, at byte offset (N−1)*sizeof(EMP). seekp() moves the put pointer there; tellg() only reports the current position.

Q3From DSSSB TGT Computer Science Practice Set 5
Which of the following best describes an attribute/column in a table?
  1. AIt is a set of numeric values in a table
  2. BIt is a set of string values in a table
  3. CIt is a vertical subset of a table
  4. DIt is a horizontal subset of a table
Show answerHide answer

Correct answer: (C) It is a vertical subset of a table

Explanation

Corrected: the book's key says (a), but its own explanation says a column is a vertical subset of a table.

Q4From DSSSB TGT Computer Science Practice Set 5
In Visual Basic, if ASC ("A") is 65, what will be ASC ("E") ?
  1. A69
  2. BError
  3. C68
  4. D70
Show answerHide answer

Correct answer: (A) 69

Explanation

ASCII codes of letters are consecutive: A=65, B=66, C=67, D=68, so E = 65 + 4 = 69.

Q5From DSSSB TGT Computer Science Practice Set 5
In Visual Basic, the constructs in which an IF block is contained inside another IF block are called:
  1. AChain of IF blocks
  2. BSequential IF blocks
  3. CNested IF blocks
  4. DSerial IF blocks
Show answerHide answer

Correct answer: (C) Nested IF blocks

Explanation

An IF block placed inside another IF block is a nested IF; the inner condition is checked only when the outer one is true.

Q6From DSSSB TGT Computer Science Practice Set 5
Which of the following statements is not correct?
  1. ALinked allocation of disk space allows only sequential access of data.
  2. BIndexed allocation of disk space allows direct access to disk blocks.
  3. CThere is no internal fragmentation in contiguous allocation of disk space.
  4. DThere is no external fragmentation in linked allocation of disk space.
Show answerHide answer

Correct answer: (C) There is no internal fragmentation in contiguous allocation of disk space.

Explanation

Contiguous allocation does suffer internal fragmentation, since a file's last block is usually only partly filled; its main problem is external fragmentation. The other three statements are correct.

Q7From DSSSB TGT Computer Science Practice Set 5
Consider the following statements about deadlock: A. Existence of a cycle in resource-allocation graph indicates deadlock. B. Existence of a cycle in wait-for graph indicates deadlock. C. Mutual-exclusion, hold and wait, no preemption and circular wait conditions, if occur simultaneously, may lead to deadlock. Mark the correct option :
  1. AOnly (b) is correct
  2. BOnly (c) is correct
  3. COnly (a) and (c) are correct
  4. DOnly (b) and (c) are correct
Show answerHide answer

Correct answer: (D) Only (b) and (c) are correct

Explanation

Corrected: the book's key says (c). A cycle in a resource-allocation graph does not always mean deadlock (with multiple instances), so A is false; B and C are correct.

Q8From DSSSB TGT Computer Science Practice Set 5
In order to interpret XML documents, you need to :
  1. AUse standardized predefined tags
  2. BSpecify the tags separately in a file
  3. CHave a document type definition for the tags
  4. DUse standardized HTML tags
Show answerHide answer

Correct answer: (C) Have a document type definition for the tags

Explanation

XML has no predefined tags, so the meaning and allowed structure of user-made tags must be described in a Document Type Definition (DTD) or schema.

Q9From DSSSB TGT Computer Science Practice Set 5
XML is a Subset of :
  1. AHTML
  2. BSGML
  3. CDGML
  4. DGML
Show answerHide answer

Correct answer: (B) SGML

Explanation

XML is a simplified subset of SGML (Standard Generalized Markup Language), the meta-language from which HTML was also derived.

Q10From DSSSB TGT Computer Science Practice Set 5
This question is based on the following SQL Table. Mr. Aman, a Computer Science Teacher maintains the details of his class 12 Students is a SQL table as follow : Table Name : MYSTUDENT ROLLNO | NAME | SEC | MARKS 80105 | MARIA | A | 83.0 80108 | AMAR | B | 44.0 80109 | MANPREET | A | 92.0 80112 | SAMEER | A | 81.0 80115 | AKBAR | B | NULL Identify the most Suitable Command to display the merit List of his students where the details will be displayed in descending order of their marks. If some students have same MARKs, their detail will be displayed in ascending order of their ROLLNO.
  1. ASELECT * FROM MYSTUDENT ORDER BY DESC MARKS, ASC ROLLNO;
  2. BSELECT * FROM MYSTUDENT ORDER BY MARKS DESC, ROLLNO ASC;
  3. CSELECT * FROM MYSTUDENT ORDER BY MARKS; ROLLNO DESC, ASC;
  4. DSELECT * FROM MYSTUDENT ORDER BY MARKS DESC; ROLLNO ASC;
Show answerHide answer

Correct answer: (B) SELECT * FROM MYSTUDENT ORDER BY MARKS DESC, ROLLNO ASC;

Explanation

ORDER BY takes the column first and the direction after it, separated by commas: ORDER BY MARKS DESC, ROLLNO ASC sorts by marks high to low and breaks ties by roll number ascending. The other options have wrong syntax.

Q11From DSSSB TGT Computer Science Practice Set 5
This question is based on the following SQL Table. Mr. Aman, a Computer Science Teacher maintains the details of his class 12 Students is a SQL table as follow : Table Name : MYSTUDENT ROLLNO | NAME | SEC | MARKS 80105 | MARIA | A | 83.0 80108 | AMAR | B | 44.0 80109 | MANPREET | A | 92.0 80112 | SAMEER | A | 81.0 80115 | AKBAR | B | NULL Which of the following command can display the SEC wise Average of the student ?
  1. ASELECT SEC, AVG (MARKS) FROM MYSTUDENT ORDER BY SEC;
  2. BSELECT SEC, AVG (MARKS) FROM MYSTUDENT GROUP BY MARKS;
  3. CSELECT *SEC, AVG (MARKS) FROM MYSTUDENT GROUP BY SEC;
  4. DSELECT AVG (MARKS) FROM MYSTUDENT ORDER BY SEC;
Show answerHide answer

Correct answer: (C) SELECT *SEC, AVG (MARKS) FROM MYSTUDENT GROUP BY SEC;

Explanation

Section-wise averages need GROUP BY SEC with SELECT SEC, AVG(MARKS); ORDER BY only sorts and does not form groups, and GROUP BY MARKS groups the wrong column. Option C is the intended query (the "*" is a printing slip).

Q12From DSSSB TGT Computer Science Practice Set 5
Consider the following expression tree. Tree: root is '+'; its left child is 'a' and its right child is '*'; the '*' node has left child 'b' and right child 'c'. In-order, pre-order and post-order traversal of this tree will result into which of the following expressions, respectively.
  1. Aa+bc*, +a*bc, abc*+
  2. Ba+b*c, +abc*, abc*+
  3. Ca+b*c, +a*bc, abc*+
  4. Da+b*c, +a*bc, abc+*
Show answerHide answer

Correct answer: (C) a+b*c, +a*bc, abc*+

Explanation

In-order (left, root, right) gives a+b*c, pre-order (root first) gives +a*bc, and post-order (root last) gives abc*+.

Q13From DSSSB TGT Computer Science Practice Set 5
Running time of a 'for' loop is ______ the running time of the statements inside the for loop times the number of iterations.
  1. AAtleast
  2. BAtmost
  3. CEqual to
  4. DIndependent of
Show answerHide answer

Correct answer: (B) Atmost

Explanation

The loop body runs once per iteration, so the loop's running time is at most the time of the statements inside it (including the test) multiplied by the number of iterations.

Q14From DSSSB TGT Computer Science Practice Set 5
Identify the Hexadecimal equivalent of the decimal number. (3245)10 = ( ? )16
  1. ACBF
  2. BCED
  3. CCAD
  4. DCBA
Show answerHide answer

Correct answer: (C) CAD

Explanation

3245 ÷ 16 = 202 remainder 13 (D); 202 ÷ 16 = 12 remainder 10 (A); 12 = C. Reading upward gives CAD.

Q15From DSSSB TGT Computer Science Practice Set 5
Binary equivalent of the Hexadecimal number (7A4)₁₆ is :
  1. A(11110100100)₂
  2. B(10000101111)₂
  3. C(10010001111)₂
  4. D(10000010100)₂
Show answerHide answer

Correct answer: (A) (11110100100)₂

Explanation

Replace each hex digit with 4 bits: 7 = 0111, A = 1010, 4 = 0100, giving 011110100100 = 11110100100.

Q16From DSSSB TGT Computer Science Practice Set 5
The ______ is a popular high-bandwidth, processor independent bus that can function as a mezzanine or peripheral bus.
  1. APeripheral component interconnect (PCI)
  2. BPeripheral component disconnect (PCD)
  3. CInput output connect
  4. DArray connect
Show answerHide answer

Correct answer: (A) Peripheral component interconnect (PCI)

Explanation

PCI (Peripheral Component Interconnect) is a high-bandwidth, processor-independent bus that can work as a mezzanine or peripheral bus.

Q17From DSSSB TGT Computer Science Practice Set 5
Sequential, direct, random and associative are access methods and key characteristics of computer ______ system.
  1. AStack
  2. BCounter
  3. CMemory
  4. DCore
Show answerHide answer

Correct answer: (C) Memory

Explanation

Sequential, direct, random and associative access are the access methods used to describe computer memory systems.

Q18From DSSSB TGT Computer Science Practice Set 5
The file size of a 640 by 480 picture of 256 colours in a 8-bit resolution is
  1. A300 KB
  2. B900 KB
  3. C128 KB
  4. D1024 KB
Show answerHide answer

Correct answer: (A) 300 KB

Explanation

256 colours need 8 bits = 1 byte per pixel. 640 × 480 = 307,200 bytes, and 307,200 ÷ 1024 = 300 KB.

Q19From DSSSB TGT Computer Science Practice Set 5
The diagram below depicts : Figure: a repeating sine-like wave plotted against time (in seconds) on the horizontal axis; the vertical extent is marked 'amplitude', the distance between two successive peaks is marked 'period', the top of a wave is labelled 'crest' and the bottom is labelled 'trough'.
  1. ASound in wave form.
  2. BWind frequency.
  3. CLine of sight.
  4. DCompressions on a map.
Show answerHide answer

Correct answer: (A) Sound in wave form.

Explanation

The figure shows a wave with amplitude, period, crest and trough plotted against time, which is how a sound wave is represented.

Q20From DSSSB TGT Computer Science Practice Set 5
A transient of 100 ms is to be captured on a digital storage oscilloscope on full screen in the horizontal direction. If the transient is to be recorded at a sampling rate of 100 KS/s, what should the minimum size of the acqisition memory be ?
  1. A5K
  2. B10K
  3. C15K
  4. D20K
Show answerHide answer

Correct answer: (B) 10K

Explanation

Samples needed = sampling rate × time = 100,000 per second × 0.1 s = 10,000 samples, so the acquisition memory must hold at least 10K.

Q21From DSSSB TGT Computer Science Practice Set 5
Prolog in XML contains an XML declaration like
  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: (A) <?xml version="1.0">

Explanation

The XML declaration in the prolog starts with <?xml, as in <?xml version="1.0"?>. Option A is the only one that uses the <? processing-instruction form.

Q22From DSSSB TGT Computer Science Practice Set 5
A web page contains many small images. We can speed up the performance of the browser by
  1. AHaving multiple processes executed simultaneously.
  2. BHaving multiple threads.
  3. CIncreasing the speed of the transmission lipe.
  4. DIncreasing the main memory of the system.
Show answerHide answer

Correct answer: (B) Having multiple threads.

Explanation

With multiple threads the browser can download and render several small images at the same time instead of one after another, which speeds up loading.

Q23From DSSSB TGT Computer Science Practice Set 5
The percentage resolution of an eight bit D/A converter is
  1. A0.39%
  2. B0.38%
  3. C0.50%
  4. D0.51%
Show answerHide answer

Correct answer: (A) 0.39%

Explanation

Resolution = 1/(2⁸ − 1) = 1/255 ≈ 0.0039, which is about 0.39%.

Q24From DSSSB TGT Computer Science Practice Set 5
The diagram below represents Figure: a log-scale graph of 'Transistors per chip' (10³ to 10⁹) on the vertical axis against years 1970 to 2010 on the horizontal axis; the plotted points rise along a straight line on the log scale (doubling at regular intervals), ending at a '1 billion transistor CPU' near 2010.
  1. AMoore' law.
  2. BNewton Raphson method.
  3. CBoyle's law.
  4. DGregor law.
Show answerHide answer

Correct answer: (A) Moore' law.

Explanation

The log-scale graph shows transistors per chip doubling at regular intervals, which is Moore's law.

Q25From DSSSB TGT Computer Science Practice Set 5
______ is the first Intel x86 microprocessor with a dual core, referring to the implementation of two processors on a single chip.
  1. ACore
  2. BCore 2 duo
  3. CDual core
  4. DCentrino
Show answerHide answer

Correct answer: (A) Core

Explanation

Following Stallings' list of Intel processors, the Intel Core was the first x86 microprocessor with a dual core, meaning two processors on a single chip. Core 2 Duo came later.

Q26From DSSSB TGT Computer Science Practice Set 5
Program counter contents indicate :
  1. AThe time needed to execute a program.
  2. BThe time elapsed since execution begins.
  3. CThe address where next instruction is stored.
  4. DThe count of programs being executed after switching the power ON.
Show answerHide answer

Correct answer: (C) The address where next instruction is stored.

Explanation

The program counter holds the address of the next instruction to be fetched and executed.

Q27From DSSSB TGT Computer Science Practice Set 5
Semaphores are used to solve the problem of ______.
  1. AMutual exclusion
  2. BRace condition
  3. CProcess synchronization
  4. DThe belady problem
Show answerHide answer

Correct answer: (C) Process synchronization

Explanation

Semaphores are a synchronization tool. They control how concurrent processes access shared resources, which solves process synchronization problems, including mutual exclusion.

Q28From DSSSB TGT Computer Science Practice Set 5
In the context of Visual Basic, multiple controls of the same type can be grouped into an array, in the same manner as a collection of data items. Such a grouping is known as :
  1. AControl array
  2. BPrimary array
  3. CSecondary array
  4. DAn integer array
Show answerHide answer

Correct answer: (A) Control array

Explanation

A control array is a group of controls of the same type that share one name and are told apart by an Index property.

Q29From DSSSB TGT Computer Science Practice Set 5
Consider two database relations R and S having 3 tuples in R and 2 tuples in S. What is the maximum number of tuples that could appear in the natural join of R and S?
  1. A6
  2. B2
  3. C3
  4. D5
Show answerHide answer

Correct answer: (A) 6

Explanation

At most, the natural join can produce every combination, as when there are no common attributes or every row shares the same common value. That is 3 × 2 = 6 tuples.

Q30From DSSSB TGT Computer Science Practice Set 5
The ______ attribute of <TABLE> tag is used to control the distance between the data in a cell and the boundaries of the cell.
  1. AColspan
  2. BRowspan
  3. CCellpadding
  4. DCellspacing
Show answerHide answer

Correct answer: (C) Cellpadding

Explanation

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

Q31From DSSSB TGT Computer Science Practice Set 5
File operations that manipulate the 'open-count' maintained for each entry in open-file table include:
  1. AOpen, write
  2. BRead, write
  3. CWrite, close
  4. DOpen, close
Show answerHide answer

Correct answer: (D) Open, close

Explanation

The open-count records how many processes have the file open. open() increments it and close() decrements it, and the entry is removed when it reaches zero.

Q32From DSSSB TGT Computer Science Practice Set 5
Given the list of tasks in Col-A and list of data structure in Col-B. Identify the best match. Col-A | Col-B A. Recursion | (i) Binary tree B. Scheduling | (ii) Stack C. Sorting | (iii) Queue
  1. AA-(i), B-(iii), C-(ii)
  2. BA-(ii), B-(i), C-(iii)
  3. CA-(iii), B-(ii), C-(i)
  4. DA-(ii), B-(iii), C-(i)
Show answerHide answer

Correct answer: (D) A-(ii), B-(iii), C-(i)

Explanation

Recursion uses a stack of activation records, scheduling uses a queue (first come, first served), and sorting can use a binary tree (as in a BST or heap).

Q33From DSSSB TGT Computer Science Practice Set 5
______ operation preserves those tuples that would be lost in ______.
  1. ANatural join, outer join
  2. BOuter join, natural join
  3. CLeft outer join, right outer join
  4. DLeft outer join, natural join
Show answerHide answer

Correct answer: (B) Outer join, natural join

Explanation

An outer join keeps the unmatched tuples, padded with NULLs, that a natural join would drop.

Q34From DSSSB TGT Computer Science Practice Set 5
Which of the following applications may use a stack? (A) Parenthesis balancing program (B) Process scheduling in operating system (C) Conversion of infix arithmetic expression to postfix form
  1. A(A) and (B)
  2. B(B) and (C)
  3. C(A) and (C)
  4. D(A), (B) and (C)
Show answerHide answer

Correct answer: (C) (A) and (C)

Explanation

Stacks are used for parenthesis balancing and infix-to-postfix conversion, so (A) and (C) are correct. Process scheduling uses queues, not stacks.

Q35From DSSSB TGT Computer Science Practice Set 5
In which of the following, the density of the core remains constant from the center to the edges?
  1. ASingle mode fiber
  2. BMultimode step-index fiber
  3. CMultimode graded-index fiber
  4. DSingle mode step-index fiber
Show answerHide answer

Correct answer: (B) Multimode step-index fiber

Explanation

In a multimode step-index fiber, the core has the same density (refractive index) everywhere, with a sudden step at the cladding. In graded-index fiber the density changes gradually.

Q36From DSSSB TGT Computer Science Practice Set 5
MPEG involves both spatial compression and temporal compression. The spatial compression is similar to JPEG and temporal compression removes ______ frames.
  1. AVoice
  2. BSpatial
  3. CTemporal
  4. DRedundant
Show answerHide answer

Correct answer: (D) Redundant

Explanation

MPEG temporal compression removes redundant frames. Consecutive frames are largely the same, so only the differences from reference frames are stored.

Q37From DSSSB TGT Computer Science Practice Set 5
______ variables are not reinitialized each times Visual Basic invokes a procedure and thus retains or preserves value even when a procedure ends.
  1. AStatic
  2. BDynamic
  3. CVirtual
  4. DPrivate
Show answerHide answer

Correct answer: (A) Static

Explanation

A Static variable keeps its value between procedure calls. It is not reinitialized each time the procedure runs.

Q38From DSSSB TGT Computer Science Practice Set 5
What is data encryption standard (DES)?
  1. ABlock cipher
  2. BStream cipher
  3. CBit cipher
  4. DNone of the above
Show answerHide answer

Correct answer: (A) Block cipher

Explanation

DES is a symmetric block cipher that encrypts data in 64-bit blocks with a 56-bit key.

Q39From DSSSB TGT Computer Science Practice Set 5
Which of the following represents stealing the ideas or stealing the creations of others?
  1. APlagiarism
  2. BIntellectual Property Rights
  3. CPiracy
  4. DAll of the above
Show answerHide answer

Correct answer: (A) Plagiarism

Explanation

Plagiarism is presenting someone else's ideas or creations as your own. Piracy is unauthorized copying, and IPR is the legal protection itself.

Q40From DSSSB TGT Computer Science Practice Set 5
Which of the following protocols may be used for accessing World Wide Web?
  1. AHTTP
  2. BSMTP
  3. CSLIP
  4. DNone of the above
Show answerHide answer

Correct answer: (A) HTTP

Explanation

HTTP (HyperText Transfer Protocol) is used to access web pages on the World Wide Web. SMTP is for email, and SLIP is a serial-line link protocol.

Q41From DSSSB TGT Computer Science Practice Set 5
Web pages are created in a language called
  1. ASLIP
  2. BHTML
  3. CHTTP
  4. DWWW
Show answerHide answer

Correct answer: (B) HTML

Explanation

Web pages are written in HTML (HyperText Markup Language). HTTP is the protocol that transfers them.

Q42From DSSSB TGT Computer Science Practice Set 5
The Boolean expression X + X'Y equals
  1. AX + Y
  2. BX + XY
  3. CX + YX
  4. DX' Y + Y' X
Show answerHide answer

Correct answer: (A) X + Y

Explanation

X + X'Y = (X + X')(X + Y) = 1·(X + Y) = X + Y, by the distributive law.

Q43From DSSSB TGT Computer Science Practice Set 5
A computer has 32 MB memory. How many bits are needed to access any single byte in the memory?
  1. A25
  2. B16
  3. C24
  4. D20
Show answerHide answer

Correct answer: (A) 25

Explanation

32 MB = 32 × 2²⁰ bytes = 2⁵ × 2²⁰ = 2²⁵ bytes, so 25 address bits are needed.

Q44From DSSSB TGT Computer Science Practice Set 5
A computer has 128MB memory. Each word in this computer is of 8 bytes. How many bits are required to address any single word in the memory?
  1. A27
  2. B24
  3. C23
  4. D25
Show answerHide answer

Correct answer: (B) 24

Explanation

128 MB = 2²⁷ bytes. With 8 bytes (2³) per word that is 2²⁷/2³ = 2²⁴ words, so 24 bits are needed.

Q45From DSSSB TGT Computer Science Practice Set 5
To achieve parallelism, one needs a minimum of
  1. A2 processors
  2. B3 processors
  3. C4 processors
  4. DNone of the above
Show answerHide answer

Correct answer: (A) 2 processors

Explanation

Parallelism means tasks really run at the same time, which needs at least two processors.

Q46From DSSSB TGT Computer Science Practice Set 5
What is common in three different types of traversals (inorder, preorder and postorder)?
  1. ARoot is visited before right subtree
  2. BLeft subtree is always visited before right subtree
  3. CRoot is visited after left subtree
  4. DAll of the above
Show answerHide answer

Correct answer: (B) Left subtree is always visited before right subtree

Explanation

In inorder, preorder and postorder the left subtree is always visited before the right subtree. Only the position of the root changes.

Q47From DSSSB TGT Computer Science Practice Set 5
Which of the following is correct recurrence relation for worst caset of binary search?
  1. AT(n) = 2T(n/2) + O(1), T(1) = T(0) = O(1)
  2. BT(n) = T(n/2) + O(n), T(1) = T(0) = O(1)
  3. CT(n) = T(n/2) + O(1), T(1) = T(0) = O(1)
  4. DT(n) = T(n/2) + O(log n), T(1) = T(0) = O(1)
Show answerHide answer

Correct answer: (C) T(n) = T(n/2) + O(1), T(1) = T(0) = O(1)

Explanation

Each binary search step does a constant amount of work and continues in one half of the array, giving T(n) = T(n/2) + O(1), which solves to O(log n).

Q48From DSSSB TGT Computer Science Practice Set 5
Which of the following traversal techniques lists the nodes of a binary search tree in ascending order?
  1. APostorder
  2. BPreorder
  3. CInorder
  4. DNone of the above
Show answerHide answer

Correct answer: (C) Inorder

Explanation

In a BST, an inorder traversal (left, root, right) visits the keys in ascending order.

Q49From DSSSB TGT Computer Science Practice Set 5
A hash table of length 10 uses open addressing with hash function h(k) = kmod 10 and linear probing. After inserting 6 values into an empty hash table, the table is shown below: Slot | Key 0 | 1 | 2 | 42 3 | 23 4 | 34 5 | 52 6 | 46 7 | 33 8 | 9 | Which of the following choices gives a possible order in which the key values could have been inserted in the table?
  1. A46, 42, 34, 52, 23, 33
  2. B34, 42, 23, 52, 33, 46
  3. C46, 34, 42, 23, 52, 33
  4. D42, 46, 33, 23, 34, 52
Show answerHide answer

Correct answer: (C) 46, 34, 42, 23, 52, 33

Explanation

Order C reproduces the table: 46→6, 34→4, 42→2, 23→3, 52→2 (taken) then 3, 4 (taken) so 5, and 33→3 then 4, 5, 6 (taken) so 7.

Q50From DSSSB TGT Computer Science Practice Set 5
Consider the following statements respect to JavaScript : (I) A variable is created using the keyword. (II) JavaScript is untyped language. Which of the above are true ?
  1. ANeither (I) not (II)
  2. B(I) only
  3. C(II) only
  4. DBoth (I) and (II)
Show answerHide answer

Correct answer: (D) Both (I) and (II)

Explanation

Both statements are true as intended: in JavaScript a variable is created with the var keyword (the word is missing from the question), and JavaScript is loosely (dynamically) typed, so variables have no fixed type.

How to use these DSSSB TGT / PGT Computer Science questions

Every question here was asked in a real DSSSB TGT / PGT paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full DSSSB TGT / PGT papers as timed tests to check your speed under exam conditions.

More DSSSB TGT / PGT subjects