Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT"DIPLOMA LEVEL : MODERN APPLICATION DEVELOPMENT II (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Consider the following JavaScript code snippet:

What will be the output of the above program?
What will be the output of the above program?
Solution
Considering the following code snippet, which statements aretrueabout components in Vue?

Solution
Consider the following JavaScript code snippet.

What will be printed on the console?
What will be printed on the console?
Solution
Which of the following is considered agood practicefor securing user authentication in a web application?
Solution
In the following code snippet, which values should replaceoption1andoption2so that the cookie is sent only over HTTPS and is restricted from cross-site requests?

Solution
You are working in VS Code terminal with Git CLI. You are currently on branchappdev2, and you want to merge the latest changes from themainbranch intoappdev2. Which of the following command sequences correctly performs the merge with a commit?
Solution
When comparing Redis with a typical API data store (like a relational database accessed through REST APIs), which of the following statements is true?
Solution
How can you stop a Cross-Site Scripting (XSS) attack?
Solution
Which of the following describe Redis features correctly?
Solution
Which of the following is true about Vuex state?
Solution
What is the purpose of Redis in a Celery-based system?
Solution
What happens to the fetch call when it gets a 404 status code (page not found)?
Solution
Consider the following JavaScript code.

What will be the output?
What will be the output?
Solution
Consider the following JavaScript snippet.

What will be printed on the browser's console?
What will be printed on the browser's console?
Solution
Consider the following JavaScript snippet:

What will be printed on the browsers' console?
What will be printed on the browsers' console?
Solution
Consider the following Vue Router setup and HTML.

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?
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?
Solution
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?

Solution
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?
Solution
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?

Solution
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?

Solution
Which of the following statements about the "this" keyword in JavaScript are correct?
Solution
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?
Solution
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:

Code:
Solution
A developer creates a Vue component with prototype chain inspection. The component uses class- based inheritance with lifecycle hooks. Consider the following scenario.
Code:

What will be the output on the browser's console?
Code:
What will be the output on the browser's console?
Solution
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?
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?
Solution
Comprehension Passage
Consider the Vue application.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
What happens when the user clicks the calculate button?
Solution
Comprehension Passage
Consider the Vue application.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Under which condition will the computed property expensive() re-run?
Solution
Comprehension Passage
Consider the Vue application.

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
What are the benefits of computed caching in Vue?
Solution
Comprehension Passage
Consider the following Vue 2 (CDN) code.
html code:

script:

Based on the above data, answer the given subquestions.
html code:
script:
Based on the above data, answer the given subquestions.
What happens when the user clicks on"User 2"after initially opening"User 1"?
Solution
Comprehension Passage
Consider the following Vue 2 (CDN) code.
html code:

script:

Based on the above data, answer the given subquestions.
html code:
script:
Based on the above data, answer the given subquestions.
Why is the watcher on$route.params.idnecessary in this code?
Solution
Comprehension Passage
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

Based on the above data, answer the given subquestions.
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
Based on the above data, answer the given subquestions.
What will be rendered when the user first navigates to/products/electronics?
Solution
Comprehension Passage
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

Based on the above data, answer the given subquestions.
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
Based on the above data, answer the given subquestions.
When the user navigates from/products/electronicsto/products/books, what will happen and why?
Solution
Shape
Thickness [ / ]
3
All colors