MauryaHub PYQ Practice

cs4010_2026T1_Q2_NA.pdf

Application Development Lab · Quiz 2 · Jan 2026

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

Question 2 MSQ · 4.5 marks

A network monitoring system records the packet loss percentage of a router every minute. During a congestion event, the packet loss first increases and after reaching a peak it decreases as the network stabilizes. Thus the array [[IMAGE:523f84682e36565b_2_2]] of packet loss values is bitonic (strictly increasing followed by strictly decreasing). The administrator wants to detect the minute when packet loss was maximum using an O(log n) algorithm based on binary search. Suppose we examine the middle element [[IMAGE:523f84682e36565b_2_3]] . Let, [[IMAGE:523f84682e36565b_2_4]] (left neighbor) [[IMAGE:523f84682e36565b_2_5]] (right neighbor) Which of the following facts allow us to correctly narrow the search space?
Source diagram or notationSource diagram or notationSource diagram or notationSource diagram or notation
  1. If [[IMAGE:523f84682e36565b_2_6]] , then x is the peak congestion value.
    Source diagram or notation
  2. If [[IMAGE:523f84682e36565b_2_7]] , then the peak congestion lies in the right half of the array.
    Source diagram or notation
  3. If [[IMAGE:523f84682e36565b_2_8]] , then the peak congestion lies in the left half of the array.
    Source diagram or notation
  4. If [[IMAGE:523f84682e36565b_2_9]] , then the peak congestion lies in the left half of the array.
    Source diagram or notation
  5. If [[IMAGE:523f84682e36565b_2_10]] , then the peak congestion lies in the right half of the array.
    Source diagram or notation

A published solution is not available for this question yet.

Question 3 MCQ · 4.5 marks

[[IMAGE:523f84682e36565b_3_11]]
Source diagram or notation
  1. [[IMAGE:523f84682e36565b_3_12]]
    Source diagram or notation
  2. [[IMAGE:523f84682e36565b_4_13]]
    Source diagram or notation
  3. [[IMAGE:523f84682e36565b_4_14]]
    Source diagram or notation
  4. [[IMAGE:523f84682e36565b_4_15]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 4 MCQ · 4.5 marks

Consider the following code snippet running in a browser. What will be the output on the console? [[IMAGE:523f84682e36565b_4_16]]
Source diagram or notation
  1. Shield 99 99 42
  2. Shield 10 99 42
  3. Sword 99 99 42
  4. Shield 99 42 42

A published solution is not available for this question yet.

Question 5 MCQ · 4.5 marks

Consider the following code snippet running on a browser. What is the output on the console? [[IMAGE:523f84682e36565b_5_17]]
Source diagram or notation
  1. 42 42 42
  2. 42 undefined undefined
  3. 42 undefined 42
  4. undefined undefined undefined

A published solution is not available for this question yet.

Question 6 MCQ · 3.0 marks

A developer runs the following commands starting from main. Which diagram correctly shows the repository's branch structure afterwards? [[IMAGE:523f84682e36565b_5_18]]
Source diagram or notation
  1. [[IMAGE:523f84682e36565b_6_19]]
    Source diagram or notation
  2. [[IMAGE:523f84682e36565b_6_20]]
    Source diagram or notation
  3. [[IMAGE:523f84682e36565b_6_21]]
    Source diagram or notation
  4. None of these.

A published solution is not available for this question yet.

Question 7 MCQ · 3.0 marks

Consider the below code: [[IMAGE:523f84682e36565b_6_22]] What will be the output of the above program, if executed?
Source diagram or notation
  1. Start End File Read
  2. Start File Read End
  3. File Read Start End
  4. End Start File Read

A published solution is not available for this question yet.

Question 8 MCQ · 3.0 marks

Consider the below code: [[IMAGE:523f84682e36565b_7_23]] What happens when a request is made to “/”?
Source diagram or notation
  1. Middleware A runs first, then the route handler
  2. The route handler runs first
  3. Middleware is skipped
  4. Server crashes

A published solution is not available for this question yet.

Question 9 MCQ · 3.0 marks

Consider the following relation Employee of a Company [[IMAGE:523f84682e36565b_8_24]] Which of the following options is correct?
Source diagram or notation
  1. The query returns employees who earn less than the company-wide maximum salary and joined first in the company.
  2. The query returns employees who earn less than the highest salary in their department and joined earliest in their department.
  3. The query returns employees who earn the minimum salary in their department and joined earliest in their department.
  4. The query returns employees who earn less than the department’s maximum salary and joined before the latest hire in the department.

A published solution is not available for this question yet.

Question 10 MCQ · 3.0 marks

Consider the below code: [[IMAGE:523f84682e36565b_8_25]] What will the above code fetch?
Source diagram or notation
  1. All records with all columns from the table
  2. One record with all columns from the table
  3. Only the primary keys of the table
  4. Nothing

A published solution is not available for this question yet.

Question 11 MCQ · 3.0 marks

Consider the middleware. [[IMAGE:523f84682e36565b_9_26]] What does the above middleware do?
Source diagram or notation
  1. Generates JWT tokens
  2. Protects routes from unauthenticated access
  3. Encrypts passwords
  4. Connects to the database

A published solution is not available for this question yet.

Question 12 MSQ · 3.0 marks

Consider this repository structure and the .gitignore file shown below. [[IMAGE:523f84682e36565b_9_27]] [[IMAGE:523f84682e36565b_9_28]] Which files will not be tracked by Git?
Source diagram or notationSource diagram or notation
  1. [[IMAGE:523f84682e36565b_9_29]]
    Source diagram or notation
  2. [[IMAGE:523f84682e36565b_10_30]]
    Source diagram or notation
  3. [[IMAGE:523f84682e36565b_10_31]]
    Source diagram or notation
  4. [[IMAGE:523f84682e36565b_10_32]]
    Source diagram or notation
  5. [[IMAGE:523f84682e36565b_10_33]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 13 MSQ · 3.0 marks

Consider the following relation Orders: [[IMAGE:523f84682e36565b_10_34]] Which of the following option(s) is/are correct?
Source diagram or notation
  1. The query returns the 4 most recent orders in the database.
  2. The query first sorts orders by most recent order_date, and for orders on the same date by smallest amount first.
  3. The query returns orders ranked 7 to 10 after sorting by (order_date DESC, amount ASC).
  4. The query skips the 6 newest orders and returns the next 4 orders based on the sorting order.

A published solution is not available for this question yet.

Question 14 MCQ · 2.0 marks

What is the primary purpose of Node.js?
  1. To run JavaScript in a browser
  2. To compile JavaScript into machine code
  3. To execute JavaScript on the server
  4. To replace HTTP servers completely

A published solution is not available for this question yet.

Question 15 MCQ · 2.0 marks

Consider the below code: [[IMAGE:523f84682e36565b_11_35]] Which of the following HTTP methods will trigger this route?
Source diagram or notation
  1. POST
  2. PUT
  3. GET
  4. DELETE

A published solution is not available for this question yet.

Question 16 MCQ · 2.0 marks

Consider the below code: [[IMAGE:523f84682e36565b_11_36]] What does the **create()** do?
Source diagram or notation
  1. Inserts the record directly into the database.
  2. Deletes an existing record.
  3. Opens a database connection.
  4. Creates a new entity instance.

A published solution is not available for this question yet.

Question 17 MSQ · 2.0 marks

Which of the following statements about JWT are true?
  1. JWTs are stateless authentication tokens.
  2. They must be sent in request headers.
  3. They must always be stored in databases.
  4. They contain encoded payload information.

A published solution is not available for this question yet.