DSSSB TGT / PGT · Topic-wise previous year questions

Computer Science Previous Year Questions (page 39)

2444 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.

  • 2444 questions
  • 20 topics
  • Official answer key
  • Free

Practise by topic

Q1901DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following is NOT a benefit of distributed systems?
  1. AScalability
  2. BHigh communication latency
  3. CResource sharing
  4. DFault tolerance
Show answerHide answer

Correct answer: (B) High communication latency

Explanation

High communication latency is a drawback of distributed systems caused by network delays. Scalability, resource sharing and fault tolerance are their main benefits.

Q1902DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What is the overall design of a database called?
  1. ADatabase Schema
  2. BDatabase Instance
  3. CDatabase Table
  4. DDatabase Model
Show answerHide answer

Correct answer: (A) Database Schema

Explanation

The schema is the overall logical design (structure) of the database, which rarely changes. An instance is the data stored in the database at a particular moment.

Q1903DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
In an acyclic graph directory structure, what is a common method used to implement shared directories or files?
  1. AFile duplication
  2. BSymbolic (soft) links
  3. CHard links
  4. DDirectory pointers
Show answerHide answer

Correct answer: (B) Symbolic (soft) links

Explanation

In an acyclic-graph directory, a shared file or subdirectory is usually implemented with a link, a special directory entry (symbolic link) that holds the path of the real file, so the same file appears in several directories without copying.

Q1904DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What is the ARP reply's scope in terms of message type?
  1. AAnycast
  2. BUnicast
  3. CMulticast
  4. DBroadcast
Show answerHide answer

Correct answer: (B) Unicast

Explanation

An ARP request is broadcast to all hosts on the LAN, but the reply is sent unicast directly to the requesting host, whose MAC address is already known from the request.

Q1905DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What does the XNOR gate output when A=1 and B=0?
  1. AB
  2. B0
  3. CA
  4. D1
Show answerHide answer

Correct answer: (B) 0

Explanation

XNOR outputs 1 only when both inputs are equal. With A=1 and B=0 the inputs differ, so the output is 0.

Q1906DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which technology is commonly used in Wi-Fi to enhance signal range and reliability?
  1. AMIMO (Multiple Input Multiple Output)
  2. BWEP (Wired Equivalent Privacy)
  3. CTDMA (Time Division Multiple Access)
  4. DCDMA (Code Division Multiple Access)
Show answerHide answer

Correct answer: (A) MIMO (Multiple Input Multiple Output)

Explanation

MIMO uses several antennas at the transmitter and receiver (spatial multiplexing, diversity), which raises throughput, range and reliability in 802.11n/ac/ax Wi-Fi. WEP is an old security protocol, not a range technique.

Q1907DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
In which scheduling algorithm does the disk head move in one direction, satisfying all requests until it reaches the end, and then reverses direction?
  1. ASCAN
  2. BSSTF
  3. CLOOK
  4. DFCFS
Show answerHide answer

Correct answer: (A) SCAN

Explanation

SCAN (elevator algorithm) moves the head in one direction serving requests all the way to the end of the disk, then reverses. LOOK reverses at the last request instead of the disk end.

Q1908DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
In public key cryptography, which key is used for decrypting a message encrypted with the public key?
  1. AAnother public key
  2. BA symmetric key
  3. CThe sender's private key
  4. DThe recipient's private key
Show answerHide answer

Correct answer: (D) The recipient's private key

Explanation

Data encrypted with the recipient's public key can be decrypted only with the matching private key, which the recipient alone holds.

Q1909DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
How does the receiver handle out-of-order frames in Selective Repeat?
  1. ARequests retransmission of all frames
  2. BSends a cumulative acknowledgment
  3. CBuffers them until all missing frames arrive
  4. DDiscards them immediately
Show answerHide answer

Correct answer: (C) Buffers them until all missing frames arrive

Explanation

In Selective Repeat the receiver accepts and buffers correctly received out-of-order frames, and only the missing frames are retransmitted; it then delivers them in order. Go-Back-N is the protocol that discards them.

Q1910DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
____________ is NOT allowed in a SQL:1999 view definition.
  1. AUse of subqueries
  2. BUse of nested queries
  3. CUse of aggregate formulas
  4. DUse of ORDER BY clause
Show answerHide answer

Correct answer: (D) Use of ORDER BY clause

Explanation

A view is a virtual table, and standard SQL (SQL:1999) does not allow ORDER BY in the view's defining query; ordering is applied when the view is queried. Subqueries and aggregates are allowed.

Q1911DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Select the correct SQL statement which will correctly insert a new row into the Customer table with only the CustomerID, Name, and Product columns specified, assuming the table allows NULLs for other columns.
  1. AINSERT Customer SET CustomerID=101, Name='Alice', Product='Pen';
  2. BINSERT INTO Customer VALUES (101, 'Alice', 'Pen');
  3. CINSERT INTO Customer (101, 'Alice', 'Pen');
  4. DINSERT INTO Customer (CustomerID, Name, Product) VALUES (101, 'Alice', 'Pen');
Show answerHide answer

Correct answer: (D) INSERT INTO Customer (CustomerID, Name, Product) VALUES (101, 'Alice', 'Pen');

Explanation

To insert values into only some columns, list those columns after the table name and give matching values: INSERT INTO table (cols) VALUES (...). Option B gives no column list, so it expects values for all columns.

Q1912DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which SQL statement is used to update data in a table?
  1. ACHANGE
  2. BMODIFY
  3. CUPDATE
  4. DSET
Show answerHide answer

Correct answer: (C) UPDATE

Explanation

UPDATE ... SET ... WHERE ... is the DML command that changes existing rows. SET is only a clause of UPDATE, and MODIFY is used with ALTER TABLE in some systems.

Q1913DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What is typically returned by the getpid system call in Unix-based operating systems?
  1. AThe process ID of the kernel
  2. BProcess ID of the current process
  3. CProcess ID of the first process
  4. DProcess ID of the parent process
Show answerHide answer

Correct answer: (B) Process ID of the current process

Explanation

getpid() returns the process ID of the calling (current) process. The parent's PID is returned by getppid().

Q1914DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What does the TCP service model guarantee about the order of data delivery?
  1. AData is delivered in the order it is transmitted.
  2. BData is not guaranteed to arrive in any specific order.
  3. CData may arrive out of order and is handled by the application layer.
  4. DData is delivered as fast as possible.
Show answerHide answer

Correct answer: (A) Data is delivered in the order it is transmitted.

Explanation

TCP provides a reliable, in-order byte stream: sequence numbers let the receiver reorder segments, so the application gets data in the same order it was sent. UDP gives no ordering guarantee.

Q1915DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
class Parent { protected void protectedMethod() { System.out.println("Protected method in Parent"); } } class Child extends Parent { public void childMethod() { protectedMethod(); } } public class Test { public static void main(String[] args) { Child child = new Child(); child.childMethod(); } } What will happen when the code is executed?
  1. AThe code will compile and print 'Protected method in Parent'.
  2. BCompilation Error: The protectedMethod is not visible in the Child class.
  3. CCompilation Error: childMethod is not visible due to access restrictions.
  4. DRuntime Error: Cannot access protectedMethod from the Child class.
Show answerHide answer

Correct answer: (A) The code will compile and print 'Protected method in Parent'.

Explanation

A protected member is accessible in a subclass, so Child can call protectedMethod() directly. The code compiles and prints "Protected method in Parent".

Q1916DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Given the following code snippet, what is the value of the variable c? int a, b, c; a = b = c = 15; c = c + 10;
  1. AUndefined
  2. B10
  3. C25
  4. D15
Show answerHide answer

Correct answer: (C) 25

Explanation

All three variables are set to 15 by chained assignment, then c = 15 + 10 = 25.

Q1917DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What happens when the following code executes? #include <stdio.h> int main() { char buffer[50]; int n = sprintf(buffer, "Hello, World!"); printf("%d %s", n, buffer); return 0; }
  1. APrints '13 Hello'
  2. BPrints '12 Hello'
  3. CPrints '12 Hello, World!'
  4. DPrints '13 Hello, World!'
Show answerHide answer

Correct answer: (D) Prints '13 Hello, World!'

Explanation

sprintf writes "Hello, World!" into buffer and returns the number of characters written, which is 13 (5 + comma + space + 5 + !). printf then prints "13 Hello, World!".

Q1918DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What is the 2’s complement of the binary number 1100?
  1. A0100
  2. B1111
  3. C11
  4. D1001
Show answerHide answer

Correct answer: (A) 0100

Explanation

Invert 1100 to get 0011, then add 1: 0011 + 1 = 0100.

Q1919DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following is true about nested switch statements in C?
  1. ABoth inner and outer switch statements must have a default case.
  2. BA switch statement cannot contain another switch.
  3. CInner switch cases should not contain break statement
  4. DA switch statement can contain another switch statement inside any of its cases.
Show answerHide answer

Correct answer: (D) A switch statement can contain another switch statement inside any of its cases.

Explanation

C allows switch statements to be nested: any case of an outer switch can contain a complete inner switch. A default case is optional and break is allowed inside inner cases.

Q1920DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What is the output of the following code? #include <stdio.h> int main() { int i = 5; do { printf("%d ", i); i--; } while (i > 5); return 0; }
  1. ANo output printed
  2. BInfinite loop
  3. C5 4 3 2 1
  4. D5
Show answerHide answer

Correct answer: (D) 5

Explanation

A do-while body runs at least once, so 5 is printed. Then i becomes 4 and the condition 4 > 5 is false, so the loop ends.

Q1921DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What will be the output of the following code? #include <stdio.h> int main() { int x = -1, y = 0, z = 1; int result = (x > 0) ? x : (y == 0) ? z : y; printf("%d", result); return 0; }
  1. Acompile time error
  2. B−1
  3. C1
  4. D0
Show answerHide answer

Correct answer: (C) 1

Explanation

x > 0 is false, so the second conditional (y == 0) ? z : y is evaluated. y is 0, so the result is z = 1.

Q1922DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
How many times will the innermost loop execute in the below code? #include <stdio.h> int main() { for(int i=0; i<3; i++) { for(int j=0; j<2; j++) { printf("%d ",i); } } return 0; }
  1. A6 times
  2. B3 times
  3. C5 times
  4. D2 times
Show answerHide answer

Correct answer: (A) 6 times

Explanation

The outer loop runs 3 times (i = 0,1,2) and the inner loop runs 2 times for each, so the inner body executes 3 x 2 = 6 times.

Q1923DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following causes an infinite loop?
  1. Afor (int i = 10; i >5; i--) { }
  2. Bdo { } while (0);
  3. Cwhile (1) { }
  4. Dfor (int i = 0; i < 10; i++) { }
Show answerHide answer

Correct answer: (C) while (1) { }

Explanation

while (1) has a condition that is always true (non-zero) and nothing inside the body to break out, so it never ends. The for loops terminate and do { } while (0) runs once.

Q1924DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What does the below code snippet represent? myObject.doActivity();
  1. ACalling a method named doActivity on the object myObject
  2. BSending a message to the doActivity class
  3. CCreating an object myObject
  4. DSending a message to the child class of myObject
Show answerHide answer

Correct answer: (A) Calling a method named doActivity on the object myObject

Explanation

The dot operator calls the method doActivity() on the object myObject (in OOP terms, sends the message doActivity to that object).

Q1925DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which arithmetic operator has the highest precedence in C?
  1. A−
  2. B=
  3. C+
  4. D%
Show answerHide answer

Correct answer: (D) %

Explanation

Among the given operators, % shares the highest (multiplicative) precedence level with * and /, above + and - (additive) and = (assignment, lowest).

Q1926DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What does the super keyword in Java do?
  1. ARefers to high performing objects
  2. BRefers to the current object
  3. CUsed to define static variables
  4. DRefers to the parent class
Show answerHide answer

Correct answer: (D) Refers to the parent class

Explanation

super refers to the immediate parent (superclass) object; it is used to call parent constructors and access parent methods or fields. The current object is referred to by this.

Q1927DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What will be the output of the following code snippet? #include<stdio.h> int main() { int a = 5, b = 3, c = 0; if (a > b > c) { printf("True\n"); } else { printf("False\n"); } return 0; }
  1. Acompile time error
  2. Bundefined behavior
  3. CTRUE
  4. DFALSE
Show answerHide answer

Correct answer: (C) TRUE

Explanation

Relational operators are evaluated left to right: (5 > 3) gives 1, then 1 > 0 gives 1 (true), so "True" is printed.

Q1928DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following statements is false about simplification of Boolean functions using Karnaugh Map technique?
  1. AKarnaugh Map technique is used to simplify Product of Sum (POS) form of Boolean functions.
  2. BIn Karnaugh Map, the rows and columns are represented in binary code sequence.
  3. CIn Karnaugh Map, you group adjacent squares in the form of power of two and try to cover as many minterms or maxterms as you can in one group.
  4. DKarnaugh Map technique is used to simplify Sum of Product (SOP) form of Boolean functions.
Show answerHide answer

Correct answer: (B) In Karnaugh Map, the rows and columns are represented in binary code sequence.

Explanation

In a K-map, rows and columns are labelled in Gray code (00, 01, 11, 10) so adjacent cells differ by one bit; plain binary order (00, 01, 10, 11) would break adjacency. K-maps simplify both SOP and POS forms.

Q1929DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
public class ExceptionTest { public static void main(String[] args) { try { System.out.println("Result: " + calculate(10, 0)); } catch (ArithmeticException e) { System.out.println("ArithmeticException caught: " + e.getMessage()); } catch (Exception e) { System.out.println("General exception caught: " + e.getMessage()); } finally { System.out.println("In finally block."); } } public static int calculate(int a, int b) throws Exception { try { return a / b; } catch (ArithmeticException e) { throw new Exception("Division by zero not allowed"); } finally { System.out.println("Inner finally block executed."); } } } What will be the output of the program?
  1. AInner finally block executed. General exception caught: / by zero In finally block.
  2. BInner finally block executed. General exception caught: Division by zero not allowed In finally block.
  3. CInner finally block executed. Result: 0 In finally block.
  4. DInner finally block executed. ArithmeticException caught: / by zero In finally block.
Show answerHide answer

Correct answer: (B) Inner finally block executed. General exception caught: Division by zero not allowed In finally block.

Explanation

10/0 throws ArithmeticException inside calculate, which is caught and replaced by new Exception("Division by zero not allowed"). The inner finally prints first, then main's catch (Exception) prints that message, and finally main's finally block runs.

Q1930DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What is the objective of encapsulation in object-oriented programming?
  1. ATo create multiple instances of a class
  2. BTo enable one class to inherit from another class
  3. CTo allow objects to take multiple forms
  4. DTo combine data and methods that operate on that data within a single unit
Show answerHide answer

Correct answer: (D) To combine data and methods that operate on that data within a single unit

Explanation

Encapsulation bundles data and the methods that act on it into one unit (class) and hides internal details. Inheritance and polymorphism are options B and C.

Q1931DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What will be the output of the following code? #include <stdio.h> int main() { int a = 10, b = 20; int max = (a > b) ? a : b; printf("%d", max); return 0; }
  1. A30
  2. Bcompile time error
  3. C10
  4. D20
Show answerHide answer

Correct answer: (D) 20

Explanation

a > b (10 > 20) is false, so the conditional operator returns b, and 20 is printed.

Q1932DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What will be the output of the following program? class CustomException extends Exception { public CustomException(String message) { super(message); } } public class TestCustomException { public static void main(String[] args) { try { validateAge(15); } catch (CustomException e) { System.out.println("Caught Exception: " + e.getMessage()); } finally { System.out.println("Execution finished."); } } public static void validateAge(int age) throws CustomException { if (age < 18) { throw new CustomException("Age must be 18 or above."); } System.out.println("Age is valid."); } }
  1. ACaught Exception: null Execution finished.
  2. BCompilation error because custom exceptions cannot extend Exception.
  3. CAge is valid. Execution finished.
  4. DCaught Exception: Age must be 18 or above. Execution finished.
Show answerHide answer

Correct answer: (D) Caught Exception: Age must be 18 or above. Execution finished.

Explanation

validateAge(15) throws CustomException with the message "Age must be 18 or above.", so "Age is valid." is never printed. The catch prints the message and the finally block prints "Execution finished.".

Q1933DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following techniques can be used to modify the actual variable passed to a function?
  1. AUse a local variable instead of passing any parameters.
  2. BPass a copy of the actual parameter to function.
  3. CStandard C has no options for modifying actual variables passed to a function.
  4. DPass the address of the actual parameters to function.
Show answerHide answer

Correct answer: (D) Pass the address of the actual parameters to function.

Explanation

C passes arguments by value, so to change the caller's variable you pass its address (a pointer) and modify it through *ptr inside the function.

Q1934DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What does the first dimension and the second dimension represents in a two-dimensional character array?
  1. AThe first dimension stores the length of each name, and the second stores the number of names.
  2. BThe first dimension represents the number of names in the array, and the second dimension represents the maximum length of each name.
  3. CThe first dimension represents the maximum length of the names, and the second dimension represents the number of names.
  4. DThe first dimension holds the total number of characters, and the second dimension stores the number of names.
Show answerHide answer

Correct answer: (B) The first dimension represents the number of names in the array, and the second dimension represents the maximum length of each name.

Explanation

In char names[N][L], the first dimension is the number of strings (rows) and the second is the maximum length of each string, including the null character.

Q1935DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following asymptotic notation gives asymptotically tight upper bound as well as asymptotically tight lower bound?
  1. AOmega (Ω)
  2. BBig Oh (O)
  3. CTheta (Θ)
  4. DSmall Omega (ω)
Show answerHide answer

Correct answer: (C) Theta (Θ)

Explanation

Theta notation bounds a function both from above and below by constant multiples of g(n), giving an asymptotically tight bound. Big O gives only an upper bound and Omega only a lower bound.

Q1936DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What is the primary function of a web browser?
  1. ATo store large amounts of data
  2. BTo send and receive emails
  3. CTo create websites
  4. DTo display and navigate web pages
Show answerHide answer

Correct answer: (D) To display and navigate web pages

Explanation

A web browser retrieves, renders and displays web pages and lets the user navigate between them through links. Creating websites and email are done with other software.

Q1937DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What will be the output of the C program given below? #include <stdio.h> int* func() { static int arr[5] = { 1, 2, 3, 4, 5 }; return arr; } int main() { int* ptr = func(); printf("Array Elements: "); for (int i = 0; i < 5; i++) { printf("%d ", *ptr); } return 0; }
  1. A1 1 3 4 1
  2. B2 3 4 5 0
  3. C1 2 3 4 5
  4. D1 1 1 1 1
Show answerHide answer

Correct answer: (D) 1 1 1 1 1

Explanation

ptr is never incremented inside the loop, so *ptr always reads arr[0] = 1, printing 1 five times (after "Array Elements: "). To print 1 2 3 4 5 the loop would need ptr[i] or *(ptr + i).

Q1938DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following DHTML methods is used to change the style of an HTML element using CSS dynamically?
  1. Adocument.createElement("style")
  2. Bdocument.getElementById("element").setCSS()
  3. Celement.style.backgroundColor = "red"
  4. Dwindow.addEventListener("resize")
Show answerHide answer

Correct answer: (C) element.style.backgroundColor = "red"

Explanation

In DHTML, a style is changed at run time by assigning to the element's style object, e.g. element.style.backgroundColor = "red". There is no setCSS() method, and resize is an event, not a styling method.

Q1939DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following statements is INCORRECT about the storage classes in C?
  1. AThe scope of variable in automatic storage class is local to the block in which the variable is defined.
  2. BIn Register storage class, the default initial value of the variable is zero.
  3. CIn static storage class, the default initial value of the variable is zero.
  4. DIn Register storage class, the storage of a variable is CPU register.
Show answerHide answer

Correct answer: (B) In Register storage class, the default initial value of the variable is zero.

Explanation

Register variables, like automatic ones, have a garbage (undefined) initial value if not initialised; only static and global variables default to zero. So statement B is incorrect.

Q1940DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What will be the output of the given C program? #include <stdio.h> int main() { { int x = 10, y = 20; { { int y = 40; x++; y++; } printf("x = %d, y = %d\n", x, y); } } return 0; }
  1. Ax = 11, y = 41
  2. Bx = 10, y = 41
  3. Cx = 10, y = 20
  4. Dx = 11, y = 20
Show answerHide answer

Correct answer: (D) x = 11, y = 20

Explanation

The inner block declares a new y = 40, which shadows the outer y; y++ changes only that inner copy. x is not redeclared, so x++ changes the outer x to 11. The printf sees x = 11 and the outer y = 20.

Q1941DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which advantage of AJAX helps in reducing bandwidth consumption?
  1. AAJAX uses less JavaScript.
  2. BAJAX only loads images on the page.
  3. CAJAX increases data transfer.
  4. DAJAX sends and retrieves only small amounts of data from the server.
Show answerHide answer

Correct answer: (D) AJAX sends and retrieves only small amounts of data from the server.

Explanation

AJAX exchanges only the small pieces of data needed in the background and updates part of the page, instead of reloading the whole page, so less data is transferred.

Q1942DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following cases DOES NOT exist when one computes the time complexity of an algorithm?
  1. AAverage case
  2. BWorst case
  3. CTest Case
  4. DBest Case
Show answerHide answer

Correct answer: (C) Test Case

Explanation

Time complexity is analysed for the best, average and worst cases. A "test case" is an input used in software testing, not a case of complexity analysis.

Q1943DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following options is correct about the functions in C language?
  1. AActual parameters are declared in the function definition.
  2. BActual parameters are always variables.
  3. CActual parameters are used to define the function signature and to specify the type and number of arguments that a function can accept.
  4. DActual parameters are the values that are passed to a function when it is called.
Show answerHide answer

Correct answer: (D) Actual parameters are the values that are passed to a function when it is called.

Explanation

Actual parameters (arguments) are the values or expressions passed in the function call. The parameters declared in the function definition are formal parameters, and actual arguments need not be variables (constants and expressions work too).

Q1944DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following DHTML methods is used to control the browser window size, such as resizing it dynamically via JavaScript?
  1. Awindow.resizeTo()
  2. Bwindow.setSize()
  3. Cwindow.changeSize()
  4. Ddocument.resizeWindow()
Show answerHide answer

Correct answer: (A) window.resizeTo()

Explanation

window.resizeTo(width, height) resizes the browser window to the given size (resizeBy changes it by an amount). setSize(), changeSize() and resizeWindow() do not exist.

Q1945DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which sorting technique is best for sorting a linked list with n elements?
  1. AInsertion sort
  2. BBubble sort
  3. CMerge sort
  4. DSelection sort
Show answerHide answer

Correct answer: (C) Merge sort

Explanation

Merge sort suits linked lists: it needs only sequential access, splits the list by moving pointers, merges without extra arrays and runs in O(n log n). Other sorts are O(n²) or need random access.

Q1946DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following PHP functions is used to sort an array in ascending order without affecting the keys?
  1. Aksort()
  2. Barray_sort()
  3. Casort()
  4. Dsort()
Show answerHide answer

Correct answer: (C) asort()

Explanation

asort() sorts an array by value in ascending order while keeping each key associated with its value. sort() re-indexes the keys, and ksort() sorts by key.

Q1947DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which tool is used to adjust the brightness and contrast of an image in Adobe Photoshop?
  1. AHealing brush tool
  2. BPaint bucket tool
  3. CAdjustments panel
  4. DSelection tool
Show answerHide answer

Correct answer: (C) Adjustments panel

Explanation

Brightness/Contrast and other tonal corrections are applied from the Adjustments panel (Image > Adjustments) in Photoshop. The healing brush repairs blemishes and the paint bucket fills areas with colour.

Q1948DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following is NOT a correct way of declaring and initializing array in C?
  1. Achar arr[6] ={2};
  2. Bchar arr[ ] = “consultancy”;
  3. Cchar arr[6];              arr = “consultancy”;
  4. Dchar arr[6] ={ };
Show answerHide answer

Correct answer: (C) char arr[6];              arr = “consultancy”;

Explanation

An array name is not a modifiable lvalue, so a string cannot be assigned with arr = "..." after declaration (and "consultancy" needs 12 chars, more than 6). Strings must be given at initialisation or copied with strcpy.

Q1949DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
Which of the following formats is commonly used for exporting images for the web?
  1. APNG
  2. BPSD
  3. CBMP
  4. DTIFF
Show answerHide answer

Correct answer: (A) PNG

Explanation

PNG is a compressed, lossless format with transparency that all browsers support, so it is commonly used for web images. PSD is Photoshop's working file, and BMP/TIFF are large and not web-friendly.

Q1950DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)
What will be the output of the given C program? #include <stdio.h> int main() { int a = 4; int b = 3; int result; result = a ^ b; printf("%d", result); return 0; }
  1. A0
  2. B3
  3. C4
  4. D7
Show answerHide answer

Correct answer: (D) 7

Explanation

^ is bitwise XOR: 4 = 100 and 3 = 011, so 100 XOR 011 = 111 = 7.

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