MauryaHub PYQ Practice

cs4010_2026T2_Q2_NA.pdf

Application Development Lab · Quiz 2 · May 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 MCQ · 4.5 marks

**Minimum Coin Change using Dynamic Programming** You are given an unlimited supply of coins of different denominations and a target amount. Your task is to determine the minimum number of coins required to make the target amount exactly. If it is not possible to form the target amount, the algorithm should report that no solution exists. A common Dynamic Programming approach solves this problem by computing the minimum number of coins required for all smaller amounts before calculating the answer for the target amount. Which of the following statements is NOT true about solving the Minimum Coin Change problem using Dynamic Programming?
  1. We can define each subproblem as finding the minimum number of coins required to make every amount from 0 up to the target amount.
  2. The minimum number of coins required for a larger amount can be computed using the optimal solutions already obtained for smaller amounts.
  3. A Dynamic Programming solution stores the minimum number of coins required for each intermediate amount so that these values can be reused instead of being recomputed.
  4. The order in which the Dynamic Programming table is filled (for example, solving larger amounts before smaller ones without already having their answers) does not affect the correctness of the algorithm.

A published solution is not available for this question yet.

Question 3 MCQ · 4.5 marks

Consider the below express code. [[IMAGE:6dc645839161d71e_3_2]] When a GET request is made to the route [[IMAGE:6dc645839161d71e_3_3]] , what will be logged in the server logs?
Source diagram or notationSource diagram or notation
  1. A B C
  2. A B
  3. B C
  4. A C

A published solution is not available for this question yet.

Question 4 MCQ · 4.5 marks

Consider the below code. [[IMAGE:6dc645839161d71e_3_4]] What will be returned in the response for the below request [[IMAGE:6dc645839161d71e_3_5]]
Source diagram or notationSource diagram or notation
  1. 20
  2. 50
  3. undefined
  4. Runtime Error

A published solution is not available for this question yet.

Question 5 MCQ · 4.5 marks

Consider the below code. [[IMAGE:6dc645839161d71e_4_6]] Assume that bcrypt generates a unique random salt for every call, so the same salt is never reused. What will be the output of the above program?
Source diagram or notation
  1. Runtime Error
  2. true
  3. false
  4. The behavior is unpredictable

A published solution is not available for this question yet.

Question 6 MSQ · 3.0 marks

Which of the following are valid ways to create a **shallow** copy of an array?
  1. [[IMAGE:6dc645839161d71e_4_7]]
    Source diagram or notation
  2. [[IMAGE:6dc645839161d71e_4_8]]
    Source diagram or notation
  3. [[IMAGE:6dc645839161d71e_4_9]]
    Source diagram or notation
  4. [[IMAGE:6dc645839161d71e_4_10]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 7 MSQ · 3.0 marks

Which of the following statements about Entity design is/are correct?
  1. Each entity generally represents one database table.
  2. Every entity must have exactly one string column.
  3. Primary keys uniquely identify each record.
  4. Entity decorators help ORM map classes to database tables.

A published solution is not available for this question yet.

Question 8 MCQ · 3.0 marks

Consider the below javascript program. [[IMAGE:6dc645839161d71e_5_11]] What will be the output of the above program?
Source diagram or notation
  1. Runtime Error
  2. undefined
  3. 2
  4. 3

A published solution is not available for this question yet.

Question 9 MCQ · 3.0 marks

Consider the below nodejs server code. [[IMAGE:6dc645839161d71e_5_12]] Assume the server is running locally. What happens when a request is made to the URL [[IMAGE:6dc645839161d71e_5_13]] ?
Source diagram or notationSource diagram or notation
  1. The response completes successfully.
  2. The client keeps waiting because the response never ends.
  3. The server crashes immediately.
  4. Node.js automatically calls [[IMAGE:6dc645839161d71e_6_14]] .
    Source diagram or notation

A published solution is not available for this question yet.

Question 10 MCQ · 3.0 marks

Consider the below nodejs server code. [[IMAGE:6dc645839161d71e_6_15]] Assume the server is running locally. What will be returned when a request is made to the URL [[IMAGE:6dc645839161d71e_6_16]] ?
Source diagram or notationSource diagram or notation
  1. Home (with status code 200)
  2. About (with status code 200)
  3. Page Not Found (with status code 404)
  4. Internal Server Error (with status code 500)

A published solution is not available for this question yet.

Question 11 MCQ · 3.0 marks

Consider the following relation: **Product(product_id, product_name, category, price)** The following SQL query is executed: [[IMAGE:6dc645839161d71e_7_17]] Which of the following best describes the output?
Source diagram or notation
  1. The four most expensive products in the Electronics category.
  2. The 3rd, 4th, 5th and 6th most expensive products in the Electronics category.
  3. All Electronics products except the two most expensive ones.
  4. The 3rd, 4th, 5th and 6th cheapest products in the Electronics category.

A published solution is not available for this question yet.

Question 12 MCQ · 3.0 marks

Consider the below typeORM entity. [[IMAGE:6dc645839161d71e_7_18]] Assume the corresponding table already exists. Which of the following operations will successfully insert a new record?
Source diagram or notation
  1. [[IMAGE:6dc645839161d71e_7_19]]
    Source diagram or notation
  2. [[IMAGE:6dc645839161d71e_8_20]]
    Source diagram or notation
  3. [[IMAGE:6dc645839161d71e_8_21]]
    Source diagram or notation
  4. [[IMAGE:6dc645839161d71e_8_22]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 13 MCQ · 3.0 marks

Consider the below middleware implementation. [[IMAGE:6dc645839161d71e_8_23]] What is the potential issue in the above implementation?
Source diagram or notation
  1. If [[IMAGE:6dc645839161d71e_8_24]] throws an exception, the server may return an unhandled error.
    Source diagram or notation
  2. Missing Authorization header.
  3. JWT verification always returns false.
  4. There is no issue.

A published solution is not available for this question yet.

Question 14 MCQ · 2.0 marks

Consider the following sequence of Git commands. [[IMAGE:6dc645839161d71e_9_25]] Which of the following statements is true?
Source diagram or notation
  1. The latest changes are already committed.
  2. The latest changes are staged.
  3. The latest changes exist only in the working directory.
  4. Git automatically creates another commit.

A published solution is not available for this question yet.

Question 15 MCQ · 2.0 marks

Consider the below typeorm query operation. [[IMAGE:6dc645839161d71e_9_26]] What is the potential issue in the above logic?
Source diagram or notation
  1. [[IMAGE:6dc645839161d71e_9_27]] always returns an array.
    Source diagram or notation
  2. If no matching record exists, accessing [[IMAGE:6dc645839161d71e_9_28]] may cause a runtime error.
    Source diagram or notation
  3. TypeORM automatically creates a default user.
  4. There is no issue.

A published solution is not available for this question yet.

Question 16 MCQ · 2.0 marks

Consider the below middleware implementation. [[IMAGE:6dc645839161d71e_10_29]] What will be returned if a GET request is made to the route [[IMAGE:6dc645839161d71e_10_30]] ?
Source diagram or notationSource diagram or notation
  1. [[IMAGE:6dc645839161d71e_10_31]]
    Source diagram or notation
  2. [[IMAGE:6dc645839161d71e_10_32]]
    Source diagram or notation
  3. [[IMAGE:6dc645839161d71e_10_33]]
    Source diagram or notation
  4. [[IMAGE:6dc645839161d71e_10_34]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 17 MSQ · 2.0 marks

Which of the following [[IMAGE:6dc645839161d71e_10_35]] compiler options are correctly matched with their purpose?
Source diagram or notation
  1. [[IMAGE:6dc645839161d71e_10_36]] → Specifies the source folder.
    Source diagram or notation
  2. [[IMAGE:6dc645839161d71e_11_37]] → Specifies where compiled JavaScript files are generated.
    Source diagram or notation
  3. [[IMAGE:6dc645839161d71e_11_38]] → Specifies the JavaScript version to generate.
    Source diagram or notation
  4. [[IMAGE:6dc645839161d71e_11_39]] → Ignore all TypeScript errors.
    Source diagram or notation

A published solution is not available for this question yet.