Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Modern Application Development II
All 2024 papers
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
End Term · 22 Dec 2024 (FN)End Term
- Q1MCQ3 Marks·Choose one option
Which of the following statements is true about closures in JavaScript?
- AA closure can access variables from its outer function even after the outer function has returned.
- BA closure can be created when a function is defined inside another function.
- CClosures are useful for data encapsulation and controlling access to private data.
- DAll of these.
- Q2MCQ3 Marks·Choose one option

- AStart Inside Timeout Inside Promise End
- BStart Inside Promise Inside Timeout End
- CStart End Inside Timeout Inside Promise
- DStart End Inside Promise Inside Timeout
- Q3MCQ3 Marks·Choose one option

- AHello, John TypeError: john.greet is not a function
- BHello, John Hello, undefined
- CTypeError: john.greet is not a function TypeError: john.greet is not a function
- DHello, John Hello, John
- Q4MCQ3 Marks·Choose one option

- AThe watcher will not be triggered because “name” is a nested property of “user” object.
- BThe watcher will be triggered and log "User object changed: { name: 'Bob', age: 30 }".
- CThe watcher will be triggered, but it will only log the new “name” value, i.e., “Dev”, and not the entire user object.
- DThe watcher will throw an error because deep watching is not supported on nested objects.
- Q5MCQ3 Marks·Choose one option

- AThe paragraph with the text “This paragraph is visible” will be displayed.
- BThe paragraph with the text “This paragraph is hidden” will be displayed.
- CBoth paragraphs will be displayed because of the v-if and v-else bindings.
- DNo change will happen since v-if and v-else do not update the DOM.
- Q6MCQ3 Marks·Choose one option

- Asecure=True and samesite='Strict'
- Bsecure=False and samesite='Strict'
- Csecure=True and samesite='None'
- Dsecure=False and samesite='Lax'
- Q7MCQ3 Marks·Choose one option

- A[]
- B['Laptop', ‘Laptop’, ‘Laptop’]
- C[{ id: 1, name: 'Laptop' }]
- D[undefined]
- Q8MCQ3 Marks·Choose one option
Which of the following is true regarding long polling?
- ALong polling opens multiple connections between the client and the server, and the server continuously sends updates to the client in real-time.
- BLong polling involves the client repeatedly sending requests at fixed intervals to the server to check for updates, regardless of whether new data is available.
- CLong polling allows the client to make a single request to the server, where the server holds the connection open until new data is available and then sends the response.
- DLong polling uses WebSockets to maintain a persistent, bidirectional connection between the client and the server.
- Q9MCQ3 Marks·Choose one option

- AMultiple state changes in one mutation
- BAsync operation in mutation
- CDirect state mutation
- DBoth Multiple state changes in one mutation and Async operation in mutation
- Q10MCQ3 Marks·Choose one option

- ANo authentication check
- BSQL injection vulnerability
- CUnvalidated user input
- DAll of these
- Q11MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q12MCQ3 Marks·Choose one option
What will be the output on the console?- Aerror4
- B7
- Cerror
- Dundefined
- Q13MCQ3 Marks·Choose one option

- ABegin, Start, 5, End, Finish
- BBegin, Finish, Start, 5, End
- CBegin, Finish, Start, End, 5
- DBegin, Start, Finish, 5, End
- Q14MCQ3 Marks·Choose one option
Which of the following best describes the difference between @cache.memoize() and @cache.cached() in Flask-Caching?
- A

- B

- C

- D

- A
- Q15MCQ3 Marks·Choose one option

- AIt will display the indices, values and types of all the items of the array.
- BIt will throw error on the console for the very first iteration.
- CIt will display the index, value and type of the value for the first item of array and then will throw error for the next value.
- DNone of these.
- Q16MCQ2 Marks·Choose one option
Which of the following statements is false when using the “async” and “await” keywords in JavaScript?
- AThe “await” keyword can only be used inside an async function.
- BThe “await” keyword pauses the execution of the surrounding async function until the promise resolves.
- CThe async functions always return a promise, even if the return value is not a promise.
- DThe async functions run synchronously, but their await statements execute asynchronously.
- Q17MCQ2 Marks·Choose one option

- A

- B

- C

- D

- E

- A
- Q18MCQ2 Marks·Choose one option

- A

- B

- C

- D

- E

- F

- G

- A
- Q19MCQ2 Marks·Choose one option
Which of the following statements about the beforeDestroy and destroyed lifecycle hooks in Vue is true?
- AThe “beforeDestroy” hook is called after the component is removed from the DOM, and the “destroyed” hook is called before the component is destroyed.
- BThe “beforeDestroy” hook is called before the component is removed from the DOM, and the “destroyed” hook is called after the component is destroyed.
- CThe “beforeDestroy” hook is called when the component is mounted, and the “destroyed” hook is called before the component is destroyed.
- DBoth hooks are called after the component is destroyed.
- Q20MCQ2 Marks·Choose one option

- A5
- B10
- C15
- D20
- Q21MCQ2 Marks·Choose one option
Which of the following statements is FALSE?
- ACache-Control: no-store prevents caching
- BETag helps validate cache freshness
- CData stored in sessionStorage remains available even after the browser is closed and reopened.
- DlocalStorage has larger storage limit than cookies
- Q22MCQ2 Marks·Choose one option

- A

- B

- C

- D

- A
- Q23MCQ4.5 Marks·Choose one option

- AChild Parent GrandParent
- BChild
- CGrandParent Parent Child
- DNone of these
- Q24MCQ4.5 Marks·Choose one option

- AThe increment mutation will be called immediately after the dispatch.
- BThe state will be updated after the asynchronous operation completes.
- CThe incrementAsync action will be executed synchronously, and increment will be committed before the promise resolves.
- DThe action will be skipped since mutations cannot be called inside actions.
- Q25MCQ4.5 Marks·Choose one option

- AParent
- BButton
- CButton Parent
- DParent Button
- Q26MCQ4.5 Marks·Choose one option

- ALikes: 5
- BLikes: 8
- CLikes: 6
- DLikes: 9
- Q27MCQ4.5 Marks·Choose one option

- AThe userData in the store is set to the data from the API.
- BUser: null
- CThe error will be logged, Nothing will be displayed
- DUser: Luke
- Q28MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q29MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q30MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q31MSQ4.5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q32MSQ2 Marks·Choose all correct options

- Athis.$route.params.id
- Bthis.$router.params.id
- Cthis.$route.query.id
- Dthis.$route.params['id']
End Term · 22 Dec 2024 (AN)End Term
- Q33MCQ3 Marks·Choose one option

- Asecure=False and samesite='Strict'
- Bsecure=True and samesite='None'
- Csecure=True and samesite='Strict'
- Dsecure=False and samesite='Lax'
- Q34MCQ3 Marks·Choose one option
Which of the following is true regarding long polling?
- ALong polling opens multiple connections between the client and the server, and the server continuously sends updates to the client in real-time.
- BLong polling allows the client to make a single request to the server, where the server holds the connection open until new data is available and then sends the response.
- CLong polling involves the client repeatedly sending requests at fixed intervals to the server to check for updates, regardless of whether new data is available.
- DLong polling uses WebSockets to maintain a persistent, bidirectional connection between the client and the server.
- Q35MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q36MCQ3 Marks·Choose one option
What will be the output on the console?- A7
- Berror
- Cundefined
- Derror4
- Q37MCQ3 Marks·Choose one option

- ABegin, Start, 5, End, Finish
- BBegin, Start, Finish, 5, End
- CBegin, Finish, Start, 5, End
- DBegin, Finish, Start, End, 5
- Q38MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q39MCQ3 Marks·Choose one option

- AThe paragraph with the text “This paragraph is hidden” will be displayed.
- BThe paragraph with the text “This paragraph is visible” will be displayed.
- CBoth paragraphs will be displayed because of the v-if and v-else bindings.
- DNo change will happen, since v-if and v-else do not update the DOM.
- Q40MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q41MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q42MCQ3 Marks·Choose one option

- AHome
- BProfile
- CSecurity
- DSettings
- Q43MCQ3 Marks·Choose one option

- AThe new value will be stored in session storage, and the “userName” data property will be updated.
- BThe new value will be stored in session storage, but the “userName” data property will be reset to an empty string on page refresh.
- CThe “userName” data property will be reset to an empty string, and the session storage value will be ignored on refresh.
- DThe “userName” data property will not be updated in session storage because session storage doesn't persist across refreshes.
- Q44MCQ3 Marks·Choose one option

- AII, III, I
- BIII, I, II
- CIII, II, I
- DI, II, III
- Q45MCQ2 Marks·Choose one option
Which of the following statements is FALSE?
- ACache-Control: no-store prevents caching
- BData stored in sessionStorage remains available even after the browser is closed and reopened.
- CETag helps validate cache freshness
- DlocalStorage has larger storage limit than cookies
- Q46MCQ2 Marks·Choose one option
Which of the following statements is false when using the “async” and “await” keywords in JavaScript?
- AThe “await” keyword can only be used inside an async function.
- BThe async functions run synchronously, but their await statements execute asynchronously.
- CThe “await” keyword pauses the execution of the surrounding async function until the promise resolves.
- DThe async functions always return a promise, even if the return value is not a promise.
- Q47MCQ2 Marks·Choose one option

- A

- B

- C

- D

- E

- A
- Q48MCQ2 Marks·Choose one option
You have a Celery task send_email that needs to run every 10 minutes. How can you schedule it?
- AUsing @app.task_periodic to run the task every 10 minutes.
- BUsing @app.on_periodic to schedule a periodic task.
- CUsing Celery Beat to schedule periodic tasks.
- DCelery doesn't support scheduling tasks at fixed intervals; you need to use an external scheduler.
- Q49MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q50MCQ4.5 Marks·Choose one option

- AThe increment mutation will be called immediately after the dispatch.
- BThe incrementAsync action will be executed synchronously, and increment will be committed before the promise resolves.
- CThe state will be updated after the asynchronous operation completes.
- DThe action will be skipped since mutations cannot be called inside actions.
- Q51MCQ4.5 Marks·Choose one option

- AThe watcher will be triggered and log "User object changed: { name: 'Bob', age: 30 }".
- BThe watcher will not be triggered because “name” is a nested property of “user” object.
- CThe watcher will be triggered, but it will only log the new “name” value, i.e., “Dev”, and not the entire user object.
- DThe watcher will throw an error because deep watching is not supported on nested objects.
- Q52MCQ4.5 Marks·Choose one option

- A[2, 4, 6]
- B[2, 4, 6, 8]
- C[4, 8, 12]
- D[2, 4, 6, 16]
- Q53MCQ4.5 Marks·Choose one option

- ARequired
- BInvalid format, Email exists, Required
- CRequired, Email exists
- DValidating..., Required
- Q54MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q55MCQ4.5 Marks·Choose one option

- AThe task will immediately execute and print the result 'Task completed'.
- BThe task will execute asynchronously, and 'Task completed' will be printed after a 10-second delay.
- CThe task will execute synchronously, blocking the main thread for 10 seconds.
- DNone of these
- Q56MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q57MSQ2 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q58MSQ2 Marks·Choose all correct options
Which of the following statements are true about Lighthouse?
- ALighthouse measures various performance metrics, including Time to Interactive and Speed Index.
- BLighthouse generates a single score for UI design only.
- CIt can emulate network throttling and device types during performance evaluation.
- DLighthouse focuses exclusively on performance and ignores accessibility.
- Q59MSQ2 Marks·Choose all correct options
Which of the following statement(s) is/are correct regarding the behavior of local storage in Vue.js applications?
- AThe local storage data persists even after the browser is closed and reopened.
- BThe local storage data is automatically cleared every session.
- CThe local storage can only store strings, and storing objects requires manual serialization and de-serialization.
- DVue's reactivity system automatically updates the local storage when bound to a Vue data property.
- Q60MSQ2 Marks·Choose all correct options

- AThe class, namely “classB” will always be applied to the div element.
- BThe classes, namely “classA” and “classB” will always be applied to the div element.
- CThe class, namely “classA” will only be applied to the div element, if the variable “isClassA” evaluates to true.
- DThe class, namely “classB” will only be applied to the div element, if no variable with name “isClassA” exists.
- Q61MSQ3 Marks·Choose all correct options
Which of the following statements correctly describe the use of asynchronous messaging systems and frameworks?
- ACelery allows web servers to offload long-running tasks to worker processes, decoupling task execution from user requests.
- BPush queues are used for real-time operations, while pull queues are better suited for batch processing.
- CServer-Sent Events (SSE) provide a persistent connection between server and client, enabling bi-directional communication.
- DRedis is a high-performance in-memory database that supports Pub/Sub.
- Q62MSQ3 Marks·Choose all correct options
Which of the following statement(s) is/are true about Webhooks?
- AA Webhook is a method for a server to send real-time data to another server as an HTTP POST request.
- BWebhooks are typically used for sending periodic updates at regular intervals.
- CA client must continuously poll a Webhook URL to receive data.
- DWebhooks are usually used in event-driven architectures, where an event triggers an HTTP POST request to a specified endpoint.
- Q63MSQ3 Marks·Choose all correct options
Which of the following statement(s) is/are true regarding Server-Sent Events (SSE) and WebSockets?
- ASSE is a two-way communication protocol, while WebSockets are unidirectional.
- BWebSockets are more suited for scenarios requiring bi-directional communication.
- CSSE is based on HTTP and can only be used for server-to-client communication, while WebSockets are based on TCP and support both directions.
- DSSE is an extension of WebSockets, providing enhanced support for server-to- client communication.
- Q64MSQ3 Marks·Choose all correct options
Which of the following is/are typical use case(s) for Celery tasks?
- AProcessing time-consuming or resource-intensive background jobs asynchronously.
- BDirectly handling incoming HTTP requests in web servers.
- CScheduling periodic tasks like sending emails or cleaning up the database.
- DServing real-time notifications over WebSockets.
Official KeyMaster Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.
Reveal KeyCollapse Key
Master Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.