Quiz Space

Modern Application Development II · Quiz 2 · 23 Nov 2025 · September 2025 term

Question 1: Consider the following Vue application with markup "index…

Question 1

+5 marksOne correct option

Consider the following Vue application with markup "index.html" and JavaScript file "app.js".

index.html:

html
<div id="app">
<card-component>
<template #title>
Welcome Message
</template>
<p>Main card content here</p>
<template #default>
Default slot content
</template>
<template #actions>
<button>Click Me</button>
</template>
</card-component>
</div>
<script src="app.js"></script>

app.js:

javascript
Vue.component("cardComponent", {
template: `<div class="card">
<h2>
<slot name="title"></slot>
</h2>
<div class="content">
<slot></slot>
</div>
<div class="footer">
<slot name="footer"></slot>
</div>
</div>`,
})
const app = new Vue({
el: "#app",
})

Suppose you open the "index.html" file in a browser. What will be rendered by the browser?

  1. A

    Welcome Message
    Main card content here
    Default slot content
    Click Me

  2. B

    Welcome Message
    Default slot content

  3. C

    Welcome Message
    Main card content here
    Default slot content

  4. D

    Welcome Message
    Main card content here

  5. E

    Welcome Message
    Default slot content
    Click Me

Show answer

Correct answer

  • B

    Welcome Message
    Default slot content

Question 1 of 16 in the IIT Madras BS Modern Application Development II (MAD 2) Quiz 2 paper sat on 23 Nov 2025, in the September 2025 term (IIT M DIPLOMA AN EXAM QDD2 23 Nov 2025 NEW). It carries 5 marks.

More questions from this paper

  1. Q2Consider the below JavaScript program. What will be the output of the above program?
  2. Q3Consider the below Vue component. What will be displayed in the <p> element after the button with text "Increment" is c…
  3. Q4Which of the following statement(s) is/are true about Vue.js event handling and communication?
  4. Q5Consider the below Vue class binding and select the most appropriate option(s)
  5. Q6Consider the below Vue router setup. What will be the behavior when the user visits "/user/john/posts"?
  6. Q7Consider the following Flask application configuration for Flask-Security, with the User and Role models properly defin…
  7. Q8When using Vue 2 via CDN in a plain HTML file, which of the following is the correct practice?
  8. Q9Considering that in this code Vue.js 2 CDN is used. Index.html Which of the following statements is/are true?
  9. Q10Which of the following is NOT true about Vuex compared to a Vue component?
  10. Q11Consider in this code Vue.js 2 CDN is used. Index.html Which of the following statements is/are correct, assuming the g…
  11. Q12Which statements are correct about cross-browser testing in Vue.js applications?
  12. Q13Consider this Vue 2 (CDN) method inside a component. If the ID of the user “Asha” in the database is 7, What will be st…
  13. Q14Which one of the following statements about Vuex is correct?
  14. Q15Consider the following Vue SFC. What finally appears on the browser?
  15. Q16Consider the following JavaScript code. What will be logged on the browser’s console?