MauryaHub PYQ Practice

Application Development - 2 · End Term · Sep 2025 · AN

Application Development - 2 · End Term · Sep 2025 AN

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

0 / 32 published solutions

Question 2 MCQ · 4.0 marks

Consider the following JavaScript code snippet:
Source diagram or notation
What will be the output of the above program?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MSQ · 2.0 marks

Considering the following code snippet, which statements are **true** about components in Vue?
Source diagram or notation
A.
Parent can listen with @update
B.
Parent receives payload via $event
C.
Child can directly modify parent state
D.
$emit triggers a DOM event

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 3.0 marks

Consider the following JavaScript code snippet.
Source diagram or notation
What will be printed on the console?
A.
2
B.
4
C.
Undefined
D.
Error

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 2.0 marks

Which of the following is considered a **good practice** for securing user authentication in a web application?
A.
Storing passwords as plain text in the database for quick lookup
B.
Using hashing algorithms like "bcrypt" or "Argon2" to store passwords securely
C.
Including user passwords directly in SQL queries for verification
D.
All of these

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 2.0 marks

In the following code snippet, which values should replace **option1** and **option2** so that the cookie is sent only over HTTPS and is restricted from cross-site requests?
Source diagram or notation
A.
secure=True and samesite='Strict'
B.
secure=False and samesite='Strict'
C.
secure=True and samesite='None'
D.
secure=False and samesite='Lax'

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 3.0 marks

You are working in VS Code terminal with Git CLI. You are currently on branch appdev2, and you want to merge the latest changes from the main branch into appdev2. Which of the following command sequences correctly performs the merge with a commit?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 3.0 marks

When comparing Redis with a typical API data store (like a relational database accessed through REST APIs), which of the following statements is true?
A.
Redis can only store strings, unlike API data stores which can handle complex structures.
B.
Redis is an in-memory data structure store, often used as a cache or message broker to complement API-based data stores.
C.
Redis is a relational database and queries data using SQL, just like an API data store.
D.
Redis is slower than API-based databases because it stores everything in memory.

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 3.0 marks

How can you stop a Cross-Site Scripting (XSS) attack?
A.
Backend validation of user input and make sure any user-provided text is not executed as code.
B.
Store authentication token or jwt in cookies.
C.
Use v-html to show user generated data.
D.
Send cookies with every request to the backend.

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MSQ · 2.0 marks

Which of the following describe Redis features correctly?
A.
In-memory database
B.
Can support publish-subscribe (pub/sub)
C.
Can be used as Celery result backend
D.
Requires SQL to query

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 2.0 marks

Which of the following is true about Vuex state?
A.
It should be modified only through mutations
B.
It should be modified only through actions
C.
It cannot contain nested objects
D.
It should be modified by getters

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 2.0 marks

What is the purpose of Redis in a Celery-based system?
A.
To automatically retry failed tasks
B.
To execute tasks in parallel
C.
To return computed results in JSON format
D.
To store scheduled tasks and serve as a message broker

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 3.0 marks

What happens to the fetch call when it gets a 404 status code (page not found)?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 4.0 marks

Consider the following JavaScript code.
Source diagram or notation
What will be the output?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MCQ · 3.0 marks

Consider the following JavaScript snippet.
Source diagram or notation
What will be printed on the browser's console?
A.
[2, 4, 6]
B.
[6]
C.
[4, 6]
D.
[1, 2, 3]

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MCQ · 3.0 marks

Consider the following JavaScript snippet:
Source diagram or notation
What will be printed on the browsers' console?
A.
50
B.
undefined
C.
Error
D.
7

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MCQ · 4.0 marks

Consider the following Vue Router setup and HTML.
Source diagram or notation
Suppose the webpage is served at http://127.0.0.1:5000. A user visits the URL http://127.0.0.1:5000/#/user/10/orders. What will be rendered on the browser?
A.
User Orders
B.
User 10 User Overview
C.
User 10 User Orders
D.
Nothing is rendered because sibling routes overwrite the parent route.

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MCQ · 3.0 marks

Consider the following JavaScript code snippet where a web application manages user preferences using localStorage. A user opens the application, sets their theme preference to "dark", refreshes the page once, closes the browser tab, and opens a new tab to reload the page. What will be the behavior of the theme preference?
Source diagram or notation
A.
The theme will be lost because closing the browser tab clears localStorage
B.
The theme will be preserved as "dark" because localStorage persists across browser sessions
C.
The theme will be undefined because localStorage is cleared on refresh
D.
The theme will be reset to "light" when a new tab is opened

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MCQ · 2.0 marks

A developer creates a Vue component using both v-if and v-show directives on different elements with initially false conditions. Later, the conditions are changed to true. What is the key difference in how these two directives handle the DOM?
A.
v-if removes the element from DOM when false, v-show only changes CSS display property
B.
v-show removes the element from DOM when false, v-if only changes CSS display property
C.
Both v-if and v-show re-mount the element and re-run lifecycle hooks
D.
Both directives are identical in their functionality; they just have different naming conventions

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MCQ · 3.0 marks

A Promise chain is created as follows. The first Promise resolves with a string, which is then processed through multiple .then() handlers. What will be logged to the console?
Source diagram or notation
A.
hello
B.
hello WORLD
C.
HELLO WORLD
D.
An error will be thrown

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 MCQ · 3.0 marks

A JavaScript object is created and then assigned to another variable. Modifications are made through both variables. What will be the final state of the original object?
Source diagram or notation
A.
5000
B.
3000
C.
10000
D.
undefined

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 MSQ · 2.0 marks

Which of the following statements about the "this" keyword in JavaScript are correct?
A.
In a regular function, "this" is always bound to the global object (window in browsers)
B.
In an arrow function, "this" is inherited from the enclosing lexical scope
C.
The .call() method can be used to explicitly set the context of "this" in a function
D.
In a method called on an object, "this" always refers to that object regardless of how the function is defined

A published solution is not available for this question yet.

Report a correction for Q22

Question 23 MCQ · 3.0 marks

A Vue Router application uses lazy-loaded route components. When a user navigates to a route with a dynamic parameter (e.g., /product/:id), and the computed property depends on this route parameter, what could be a potential issue if the component is not properly handling asynchronous operations?
A.
The component will throw a critical error and crash the application
B.
The computed property will return undefined because the component hasn't mounted yet
C.
The route parameter will not be accessible in the computed property
D.
The component will display data from the previously loaded route

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 MCQ · 3.0 marks

A developer uses sessionStorage to store authentication tokens in a web application. The user logs in, the token is stored, and then they close the browser window completely. When they reopen the browser later, what will happen? Code:
Source diagram or notation
A.
The token will be preserved and available in the new browser session.
B.
The token will be cleared because sessionStorage is cleared when the browser is closed.
C.
The token will be partially available but require re-authentication.
D.
The token will move to localStorage automatically.

A published solution is not available for this question yet.

Report a correction for Q24

Question 25 MCQ · 5.0 marks

A developer creates a Vue component with prototype chain inspection. The component uses class- based inheritance with lifecycle hooks. Consider the following scenario. Code:
Source diagram or notation
What will be the output on the browser's console?
A.
true true true true
B.
true false true true
C.
false true true false
D.
true true false false

A published solution is not available for this question yet.

Report a correction for Q25

Question 26 MSQ · 3.0 marks

In a web application using webhooks and Redis for real-time data synchronization: Scenario: An order management system where: • When an order is created, a webhook is sent to a notification service • Redis stores the current order cache • Multiple concurrent requests update the cache Which statements about this architecture are true?
A.
Webhooks guarantee that the notification service will process events in the exact order they were triggered
B.
Redis is suitable for this use case because it's an in-memory data structure store that provides fast access to cached data
C.
The webhook will automatically retry if the notification service is temporarily unavailable
D.
Webhooks use HTTP POST requests to communicate events asynchronously

A published solution is not available for this question yet.

Report a correction for Q26

Question 27 MCQ · 3.0 marks

Consider the Vue application.
Source diagram or notation
Based on the above data, answer the given subquestions.
What happens when the user clicks the calculate button?
A.
expensive() runs again because the DOM updates
B.
expensive() does NOT run again because its dependencies did not change
C.
Vue recomputes all computed properties on any state change
D.
Nothing is displayed

A published solution is not available for this question yet.

Report a correction for Q27

Question 28 MCQ · 3.0 marks

Consider the Vue application.
Source diagram or notation
Based on the above data, answer the given subquestions.
Under which condition will the computed property expensive() re-run?
A.
When this.time changes
B.
The user clicks anywhere on the DOM
C.
Either this.a or this.b changes
D.
When Date.now() changes

A published solution is not available for this question yet.

Report a correction for Q28

Question 29 MSQ · 3.0 marks

Consider the Vue application.
Source diagram or notation
Based on the above data, answer the given subquestions.
What are the benefits of computed caching in Vue?
A.
Reduced CPU usage
B.
Faster rendering
C.
Avoids unnecessary recomputation
D.
Makes all computations asynchronous

A published solution is not available for this question yet.

Report a correction for Q29

Question 30 MCQ · 5.0 marks

Consider the following Vue 2 (CDN) code. html code:
Source diagram or notation
script:
Source diagram or notation
Based on the above data, answer the given subquestions.
What happens when the user clicks on **"User 2"** after initially opening **"User 1"**?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q30

Question 31 MCQ · 5.0 marks

Consider the following Vue 2 (CDN) code. html code:
Source diagram or notation
script:
Source diagram or notation
Based on the above data, answer the given subquestions.
Why is the watcher on $route.params.id necessary in this code?
A.
Without it, the userId in data would never change when the route changes.
B.
It is required because Vue Router does not automatically update component data.
C.
It prevents the component from being destroyed and recreated on every navigation.
D.
Both Without it, the userId in data would never change when the route changes and It is required because Vue Router does not automatically update component data are correct.

A published solution is not available for this question yet.

Report a correction for Q31

Question 32 MCQ · 5.0 marks

Consider the following Vue.js application with two different route scenarios and a component that uses reactive data binding: Scenario: An e-commerce application where: • Product list component displays products filtered by category • Category changes through router parameters: /products/:category • When a user navigates from /products/electronics to /products/books, the product list should update
Source diagram or notation
Based on the above data, answer the given subquestions.
What will be rendered when the user first navigates to /products/electronics?
A.
An empty array because displayedProducts is initialized as null
B.
All three products because the watch handler hasn't been triggered yet
C.
Only the Laptop and Phone (both electronics)
D.
The data will show an error because the category doesn't exist in the array

A published solution is not available for this question yet.

Report a correction for Q32

Question 33 MCQ · 4.0 marks

Consider the following Vue.js application with two different route scenarios and a component that uses reactive data binding: Scenario: An e-commerce application where: • Product list component displays products filtered by category • Category changes through router parameters: /products/:category • When a user navigates from /products/electronics to /products/books, the product list should update
Source diagram or notation
Based on the above data, answer the given subquestions.
When the user navigates from /products/electronics to /products/books, what will happen and why?
A.
The computed property will not update because it's being used in a watch handler
B.
The computed property will automatically re-evaluate because the route parameter dependency changed
C.
The displayedProducts variable will update, but the computed property will display stale data
D.
Both the computed property and displayedProducts will update to show books

A published solution is not available for this question yet.

Report a correction for Q33