DSSSB TGT / PGT · Topic-wise previous year questions

Computer Science Previous Year Questions (page 12)

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

Q551DSSSB PGT Computer Science (Technical), 11 Jul 2021
Match the following file stream classes in C++ with its functions. A. Fstream base — i. Provides support for simultaneous input and output operation B. If stream — ii. Provides output operation C. Of stream — iii. Provides operations common to file streams D. F stream — iv. Provides input operation
  1. AA-i, B-ii, C-iv, D-iii
  2. BA-iv, B-iii, C-i, D-ii
  3. CA-i, B-iii, C-iv, D-ii
  4. DA-iii, B-iv, C-ii, D-i
Show answerHide answer

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

Explanation

fstreambase provides operations common to file streams, ifstream gives input, ofstream gives output, and fstream supports simultaneous input and output.

Q552DSSSB PGT Computer Science (Technical), 11 Jul 2021
In C++, "Out-of-range-index" belong to ________ type exception while keyboard interrupts are called ________ exceptions.
  1. ASynchronous; synchronous
  2. BSynchronous; asynchronous
  3. CAsynchronous; synchronous
  4. DAsynchronous; asynchronous
Show answerHide answer

Correct answer: (B) Synchronous; asynchronous

Explanation

Errors such as out-of-range index come from the program's own execution, so they are synchronous. Events beyond the program's control, such as keyboard interrupts, are asynchronous.

Q553DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is output of the given code? void main () { int a = 3, b, *p, **q; p = & a; q = & p; b = 2 * (**q + *p); cout << b; }
  1. A3
  2. B12
  3. C18
  4. D24
Show answerHide answer

Correct answer: (B) 12

Explanation

p points to a and q points to p, so **q = 3 and *p = 3. b = 2 × (3 + 3) = 12.

Q554DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is the output of code? void main () { int x = 33, y, z; z = x++ + 17; y = ++z − ++x; cout << "x" << x << "y" << y << "z" << z; }
  1. Ax = 34 y = 17 z = 51
  2. Bx = 35 y = 16 z = 51
  3. Cx = 34 y = 16 z = 50
  4. Dx = 35 y = 17 z = 51
Show answerHide answer

Correct answer: (B) x = 35 y = 16 z = 51

Explanation

z = x++ + 17 = 33 + 17 = 50 and x becomes 34. y = ++z − ++x = 51 − 35 = 16. So x = 35, y = 16, z = 51.

Q555DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement is NOT correct regarding Virtual function in C++? I. It must be a member of some class. II. It is accessed by using object points.
  1. AOnly I
  2. BOnly II
  3. CBoth I and II
  4. DNeither I nor II
Show answerHide answer

Correct answer: (D) Neither I nor II

Explanation

Both statements are true: a virtual function must be a member of a class, and it is accessed through object pointers (base-class pointers) for run-time polymorphism. So neither is incorrect.

Q556DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is join operation in Structure Query Language (SQL)?
  1. AJoin is an operation used to select group rows of a table that contains the same values in a specific column.
  2. BJoin is an operation which is used to combine two different data keys.
  3. CJoin is an operation used to combine rows from two or more tables based on one or more common fields between them.
  4. DJoin is an operation which work on a single row of a table and return a single value.
Show answerHide answer

Correct answer: (C) Join is an operation used to combine rows from two or more tables based on one or more common fields between them.

Explanation

A JOIN combines rows from two or more tables based on a related (common) column between them.

Q557DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following is NOT a part of Data Definitions Language in Relational Database Management System?
  1. ACreate table
  2. BInsert table
  3. CAlter table
  4. DDrop table
Show answerHide answer

Correct answer: (B) Insert table

Explanation

INSERT is a DML command (and is used as INSERT INTO, not "insert table"). CREATE, ALTER and DROP TABLE are DDL commands.

Q558DSSSB PGT Computer Science (Technical), 11 Jul 2021
Match the following formal relational term with informal equivalents. i. Relation — A. Row ii. Tuple — B. Value iii. Attribute — C. Table iv. Domain — D. Column
  1. Ai-3, ii-4, iii-1, iv-2
  2. Bi-3, ii-1, iii-4, iv-2
  3. Ci-1, ii-3, iii-2, iv-4
  4. Di-4, ii-3, iii-2, iv-1
Show answerHide answer

Correct answer: (B) i-3, ii-1, iii-4, iv-2

Explanation

Note: in the official paper the options refer to A, B, C, D as 1, 2, 3, 4 respectively.

Q559DSSSB PGT Computer Science (Technical), 11 Jul 2021
Write the name of the relational algebra operation as per the given order of their notation. Π, X, σ
  1. AProjection, Cartesian product, division
  2. BProjection, Cartesian product, select
  3. CIntersection join, outer join, select
  4. DProjection, outer join, select
Show answerHide answer

Correct answer: (B) Projection, Cartesian product, select

Explanation

Π is projection (choose columns), × is Cartesian product, and σ is selection (choose rows).

Q560DSSSB PGT Computer Science (Technical), 11 Jul 2021
Consider the following relation schema of students. STUDENT (Rollno, Name, DOB, Marks, Gender) Which of the given query is equivalent to this query in English? "Find the tuples of student having marks above 80".
  1. Aσ Marks>80 (STUDENT)
  2. BΠ Marks>80 (STUDENT)
  3. Cσ Marks<80 (STUDENT)
  4. DΠ Marks<80 (STUDENT)
Show answerHide answer

Correct answer: (A) σ Marks>80 (STUDENT)

Explanation

Selecting tuples (rows) that satisfy a condition uses σ: σ Marks>80 (STUDENT). Π selects columns, not rows.

Q561DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is Denormalization in Relational Database Management System?
  1. ADenormalization is the process of increasing redundancy to improve performance
  2. BDenormalization is used to decrease redundancy in database
  3. CDenormalization is used to decrease the dependence on normal forms
  4. DDenormalization is used to develop a new schema in database
Show answerHide answer

Correct answer: (A) Denormalization is the process of increasing redundancy to improve performance

Explanation

Denormalization deliberately adds redundancy (merging tables or duplicating data) to cut joins and improve read performance.

Q562DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement(s) is/are correct regarding Structured Query Language (SQL)? I. The datatype FLOAT can hold numbers with decimal points. II. The datatype BIGINT occupies 16 bytes.
  1. AOnly I
  2. BOnly II
  3. CBoth I and II
  4. DNeither I nor II
Show answerHide answer

Correct answer: (A) Only I

Explanation

FLOAT stores numbers with decimal points, but BIGINT occupies 8 bytes, not 16. So only I is correct.

Q563DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement is a part of Data Manipulative Language in Structured Query Language?
  1. ADelete
  2. BAlter table
  3. CCopy
  4. DPaste
Show answerHide answer

Correct answer: (A) Delete

Explanation

DELETE is a DML command because it manipulates data. ALTER TABLE is DDL, and copy/paste are not SQL statements.

Q564DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is the cardinality and degree of relation having 50 Tuples and 20 Attributes?
  1. ACardinality – 70 Degree – 30
  2. BCardinality – 20 Degree – 50
  3. CCardinality – 50 Degree – 20
  4. DCardinality – 50 Degree – 50
Show answerHide answer

Correct answer: (C) Cardinality – 50 Degree – 20

Explanation

Cardinality is the number of tuples (50), and degree is the number of attributes (20).

Q565DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement(s) is/are correct regarding COUNT functions in Structured Query Language of Relational Database Management System? I. COUNT(*) is used to count the number of values in a column. II. COUNT() is used to count the number of rows of the query result.
  1. AOnly I
  2. BOnly II
  3. CBoth I and II
  4. DNeither I nor II
Show answerHide answer

Correct answer: (D) Neither I nor II

Explanation

Both statements are reversed: COUNT(*) counts all rows of the result, while COUNT(column) counts the non-NULL values in a column. So neither is correct.

Q566DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is the shortcut key for right alignment of the paragraph in a Microsoft Word document?
  1. ACtrl + R
  2. BCtrl + L
  3. CCtrl + J
  4. DCtrl + E
Show answerHide answer

Correct answer: (A) Ctrl + R

Explanation

Ctrl+R right-aligns, Ctrl+L left-aligns, Ctrl+E centres and Ctrl+J justifies a paragraph.

Q567DSSSB PGT Computer Science (Technical), 11 Jul 2021
Each Microsoft Excel file is also known as ________.
  1. ADocument
  2. BWorkbook
  3. CSlide
  4. DSheet
Show answerHide answer

Correct answer: (B) Workbook

Explanation

An Excel file is a workbook, which contains one or more worksheets.

Q568DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following is the way to break a page in Microsoft Word?
  1. APressing "Ctrl + Page Down"
  2. BDouble Clicking at the end of the page
  3. CPressing "Ctrl + Enter"
  4. DDouble Clicking at the beginning of the page
Show answerHide answer

Correct answer: (C) Pressing "Ctrl + Enter"

Explanation

Ctrl + Enter inserts a manual page break in Word.

Q569DSSSB PGT Computer Science (Technical), 11 Jul 2021
Microsoft PowerPoint helps to enhance our presentation with ________. I. Pictures and charts II. Sound effect III. Tables
  1. AI and II
  2. BII and III
  3. CI and III
  4. DI, II and III
Show answerHide answer

Correct answer: (D) I, II and III

Explanation

PowerPoint lets you add pictures, charts, sound effects and tables to slides, so all three are correct.

Q570DSSSB PGT Computer Science (Technical), 11 Jul 2021
The selected text's font in Microsoft Word document will ________ on pressing "Ctrl + ]" keys.
  1. AIncrease by 1 points
  2. BIncrease by 2 points
  3. CDecrease by 1 points
  4. DDecrease by 2 points
Show answerHide answer

Correct answer: (A) Increase by 1 points

Explanation

Ctrl + ] increases the selected text's font size by 1 point, and Ctrl + [ decreases it by 1 point.

Q571DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which key open a Goto window in Microsoft Excel?
  1. AAlt +G
  2. BShift + G
  3. CTab + G
  4. DCtrl + G
Show answerHide answer

Correct answer: (D) Ctrl + G

Explanation

Ctrl + G (or F5) opens the Go To dialog in Excel, used to jump to a cell or range.

Q572DSSSB PGT Computer Science (Technical), 11 Jul 2021
In Microsoft PowerPoint, background image can be added for all the slides by editing which slide?
  1. AFirst Slide
  2. BLast Slide
  3. CAny slide
  4. DSlide Master
Show answerHide answer

Correct answer: (D) Slide Master

Explanation

Changes made to the Slide Master (such as a background image) apply to every slide that uses it.

Q573DSSSB PGT Computer Science (Technical), 11 Jul 2021
A collection of web pages is known as ________.
  1. Awebsite
  2. Bweb server
  3. CWeb world
  4. DWeb tool
Show answerHide answer

Correct answer: (A) website

Explanation

A website is a collection of related web pages under one domain.

Q574DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following is incorrect regarding user-friendly website?
  1. AIt should have faster loading time
  2. BIt should be easily accessible
  3. CIt should have browser consistency
  4. DIt should be Cluttered
Show answerHide answer

Correct answer: (D) It should be Cluttered

Explanation

A user-friendly website should load fast, be accessible and look consistent across browsers. A cluttered design hurts usability.

Q575DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following is false with reference to static website?
  1. ASame content is loaded everytime the page is loaded
  2. BIt is loaded at a faster speed
  3. CContent change at runtime
  4. DNo interaction
Show answerHide answer

Correct answer: (C) Content change at runtime

Explanation

A static website serves fixed content that is the same on every load. Content changing at runtime is a feature of dynamic websites.

Q576DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement(s) is/are correct regarding <title> tag in HTML? I. This tag always goes outside to the <head> tag. II. This tag is used to indicate the title of the webpage. III. It is also used by search engines.
  1. AI and II
  2. BII and III
  3. COnly II
  4. DI, II and III
Show answerHide answer

Correct answer: (B) II and III

Explanation

<title> must be placed inside <head>, not outside it. It sets the page title shown in the browser tab, and search engines use it.

Q577DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is tag in HTML?
  1. AIt contains the address of the webpage.
  2. BIt contains the number of nested tags in the page.
  3. CIt contains information about the webpage.
  4. DIt contains the number of tags in the web page.
Show answerHide answer

Correct answer: (C) It contains information about the webpage.

Explanation

The tag described here seems to be <meta> (the tag name is missing in the source). It holds information about the page, such as description, keywords and author.

Q578DSSSB PGT Computer Science (Technical), 11 Jul 2021
How many forms can we have on a webpage at the maximum?
  1. A1
  2. B5
  3. C10
  4. DNo limit
Show answerHide answer

Correct answer: (D) No limit

Explanation

HTML puts no limit on the number of <form> elements a page can have (they just cannot be nested).

Q579DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is image map in HTML?
  1. AIt is the backup copy of the image
  2. BIt is a special image in which different area point to different locators on the web
  3. CIt contains the properties of the image
  4. DIt contains the number of pixels in the image
Show answerHide answer

Correct answer: (B) It is a special image in which different area point to different locators on the web

Explanation

An image map is one image with clickable regions (<map>/<area>), where each region links to a different URL.

Q580DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following is not the file formats of graphics?
  1. AGIF
  2. BJPG
  3. CPNG
  4. DWAV
Show answerHide answer

Correct answer: (D) WAV

Explanation

WAV is an audio file format. GIF, JPG and PNG are image formats.

Q581DSSSB PGT Computer Science (Technical), 11 Jul 2021
If Multiple bits per pixel are used to store an image, then the frame buffer is known as ________.
  1. ABit map
  2. BBinary map
  3. CPix map
  4. DImage map
Show answerHide answer

Correct answer: (C) Pix map

Explanation

A frame buffer with one bit per pixel is a bitmap, and one with multiple bits per pixel (for colour or grey levels) is a pixmap.

Q582DSSSB PGT Computer Science (Technical), 11 Jul 2021
If an image has a height of 4 inches and an aspect ratio of 3 : 2, then what will be the width of the image?
  1. A3 inches
  2. B6 inches
  3. C4 inches
  4. D5.5 inches
Show answerHide answer

Correct answer: (B) 6 inches

Explanation

Aspect ratio is width : height = 3 : 2. With a height of 4 inches, width = 4 × 3/2 = 6 inches.

Q583DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is the resolution of 2 inch × 2 inch image which has 512 × 512 pixels?
  1. A512 pixels per inch
  2. B256 pixels per inch
  3. C2048 pixels per inch
  4. D128 pixels per inch
Show answerHide answer

Correct answer: (B) 256 pixels per inch

Explanation

Resolution = pixels ÷ inches = 512 / 2 = 256 pixels per inch.

Q584DSSSB PGT Computer Science (Technical), 11 Jul 2021
Memory buffer which stores the image definition is known as ________.
  1. APixel Buffer
  2. BFrame Buffer
  3. CGraphic Buffer
  4. DPicture Buffer
Show answerHide answer

Correct answer: (B) Frame Buffer

Explanation

The frame buffer (refresh buffer) is the memory that stores the intensity/colour value of every pixel of the screen image.

Q585DSSSB PGT Computer Science (Technical), 11 Jul 2021
Aspect ratio is the ratio of ________ to ________.
  1. Awidth; height
  2. Bheight; width
  3. Cdiagonal; height
  4. Dheight; diagonal
Show answerHide answer

Correct answer: (A) width; height

Explanation

Aspect ratio is width to height, e.g., 16 : 9.

Q586DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following is not a type of Network topology?
  1. AStar Network
  2. BRing Network
  3. CHybrid Network
  4. DSingleton Network
Show answerHide answer

Correct answer: (D) Singleton Network

Explanation

Common topologies are bus, star, ring, mesh, tree and hybrid. "Singleton network" is not a topology.

Q587DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement(s) is/are true regarding OSI layers in computer networks? I. The session layer provides means of establishing, maintaining and terminating a session between two end users. II. Data Link layer sets up a logical path between the source and destination computer of the network.
  1. AOnly I
  2. BOnly II
  3. CBoth I and II
  4. DNeither I nor II
Show answerHide answer

Correct answer: (A) Only I

Explanation

The session layer establishes, maintains and terminates sessions. Setting up the logical path (routing) between source and destination is the network layer's job, not the data link layer's.

Q588DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement(s) is/are true regarding Data Communication? I. Half duplex communication is multidirectional communication. II. Full duplex communication is bidirectional communication.
  1. AOnly I
  2. BOnly II
  3. CBoth I and II
  4. DNeither I nor II
Show answerHide answer

Correct answer: (B) Only II

Explanation

Half duplex is two-way but only one direction at a time, not "multidirectional". Full duplex is bidirectional at the same time. So only II is true.

Q589DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement(s) is/are true regarding switching techniques in Data communication? I. In circuit switching a dedicated path is identified between the sender and the receiver. II. In packet switching each information to be transmitted between sender and receiver is broken down into smaller packets.
  1. AOnly I
  2. BOnly II
  3. CBoth I and II
  4. DNeither I nor II
Show answerHide answer

Correct answer: (C) Both I and II

Explanation

Circuit switching sets up a dedicated path before transfer, and packet switching breaks the data into packets that are routed independently. Both are true.

Q590DSSSB PGT Computer Science (Technical), 11 Jul 2021
If complete graph have 'n' nodes, then it will have how many edges?
  1. An(n − 1)/2
  2. B(n − 1)/2
  3. Cn/2
  4. Dn(n − 1)/4
Show answerHide answer

Correct answer: (A) n(n − 1)/2

Explanation

Each of the n nodes connects to the other n − 1. Each edge is then counted twice, so there are n(n − 1)/2 edges.

Q591DSSSB PGT Computer Science (Technical), 11 Jul 2021
Quicksort algorithm is based on which algorithm design technique?
  1. AGreedy Algorithm
  2. BBrute -Force
  3. CDivide and Conquer
  4. DDynamic programing
Show answerHide answer

Correct answer: (C) Divide and Conquer

Explanation

Quicksort partitions the array around a pivot and recursively sorts the two parts, which is divide and conquer.

Q592DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement is false about a B-tree of order M?
  1. AThe root has at least two child nodes and at most M child nodes.
  2. BThe internal nodes except the root have at least ceil(M/2) child nodes.
  3. CLeaf nodes are not at the same level.
  4. DA node is full if it has (M − 1) keys.
Show answerHide answer

Correct answer: (C) Leaf nodes are not at the same level.

Explanation

In a B-tree all leaves are at the same level, so statement (C) is false. The others are standard B-tree properties.

Q593DSSSB PGT Computer Science (Technical), 11 Jul 2021
The number of vertices in undirected graph with odd degree is always ________.
  1. AOdd number
  2. BEven number
  3. CZero
  4. DPrime number
Show answerHide answer

Correct answer: (B) Even number

Explanation

By the handshaking lemma the sum of degrees is 2|E|, which is even, so the number of odd-degree vertices must be even.

Q594DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following isNot a NP Complete problem?
  1. AThe Clique problem
  2. BHamiltonian-Cycle problem
  3. CThe Travelling Salesman Problem
  4. DShortest Path Problem
Show answerHide answer

Correct answer: (D) Shortest Path Problem

Explanation

Shortest path is solvable in polynomial time (e.g., Dijkstra), so it is in P. Clique, Hamiltonian cycle and TSP (decision version) are NP-complete.

Q595DSSSB PGT Computer Science (Technical), 11 Jul 2021
Which of the following statement(s) is/are correct about red-black binary tree? I. Every node is either red or black. II. Every leaf node is red. III. When a node is red and both its children are black.
  1. AI and II
  2. BI, II and III
  3. CI and III
  4. DIII and II
Show answerHide answer

Correct answer: (C) I and III

Explanation

In a red-black tree every node is red or black, and a red node's children must be black. Leaves (NIL nodes) are black, not red, so II is false.

Q596DSSSB PGT Computer Science (Technical), 11 Jul 2021
Consider a max heap, represented by the array: 23, 17, 14, 6, 13, 10, 1, 5 If a value 20 is inserted into this heap, then what will be the new max heap
  1. A23, 17, 4, 6, 13, 10, 1, 5, 20
  2. B23, 20, 14, 17, 13, 10, 1, 5, 6
  3. C23, 20, 17, 14, 13, 10, 6, 5, 1
  4. D23, 17, 20, 14, 13, 10, 6, 51
Show answerHide answer

Correct answer: (B) 23, 20, 14, 17, 13, 10, 1, 5, 6

Explanation

Add 20 at position 9 as the child of 6, then swap it with 6. Its parent is now 17, so swap again. The parent 23 is larger, so it stops: 23, 20, 14, 17, 13, 10, 1, 5, 6.

Q597DSSSB PGT Computer Science (Technical), 11 Jul 2021
Consider the following graph. Vertices P, Q, R, S, T with edges (weight): P–Q (30), Q–R (5), Q–S (20), Q–T (15), P–S (40), S–T (10), R–T (25). What is the weight of minimum spanning tree?
  1. A50
  2. B60
  3. C70
  4. D80
Show answerHide answer

Correct answer: (B) 60

Explanation

Kruskal: take Q–R (5), S–T (10), Q–T (15); skip Q–S (20) and R–T (25), which would form cycles; take P–Q (30). Weight = 5 + 10 + 15 + 30 = 60.

Q598DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is the full form of LISP Programming Language?
  1. ALanguage Processing
  2. BList Processing
  3. CLeast Processing
  4. DLimited Processing
Show answerHide answer

Correct answer: (B) List Processing

Explanation

LISP stands for LISt Processing. Lists are its basic data structure.

Q599DSSSB PGT Computer Science (Technical), 11 Jul 2021
What is the fullform of FOPL in artificial intelligence?
  1. AFirst order predicate logic
  2. BFile open predicate logic
  3. CFirst operator performance logic
  4. DFile operator perforate logic
Show answerHide answer

Correct answer: (A) First order predicate logic

Explanation

FOPL is First Order Predicate Logic, which uses predicates, variables and quantifiers (∀, ∃) to represent knowledge.

Q600DSSSB PGT Computer Science (Technical), 11 Jul 2021
________ act as a interface between a domain expert and an expert system.
  1. ALanguage Editor
  2. BK editor
  3. CIntelligent editor
  4. DKnowledge Editor
Show answerHide answer

Correct answer: (C) Intelligent editor

Explanation

In expert systems, the intelligent (knowledge-acquisition) editor is the interface the domain expert or knowledge engineer uses to enter and refine the knowledge base.

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