Final Exam :C++ For C Programmers, Part A(C++ For C Programmers, Part A) Answers 2025
1. Question 1
✔️ True
❌ False
Correct: True
2. Question 2
✔️ <body> and </body>
❌ Others
3. Question 3
✔️ False
❌ True
Correct: Falsehref cannot be used directly on <img>.
4. Question 4 – Valid ID selectors
✔️ #header {}
❌ main-content {}
✔️ #main-content {}
❌ .header {} (this is class selector)
5. Question 5
✔️ True
❌ False
6. Question 6
✔️ let total = 20;
✔️ result = 30 – 10;
❌ var answer = “40 / 2”; (string, not numeric)
✔️ var sum = 15 + 5;
7. Question 7
✔️ submit
❌ load
❌ onsubmit
❌ click
8. Question 8
✔️ @PostMapping
✔️ @GetMapping
❌ @Service
✔️ @RequestMapping
9. Question 9
✔️ model.addAttribute(“productList”, productService.getAllProducts())
10. Question 10
✔️ Spring Web
❌ Others
11. Question 11
✔️ @RequestParam
❌ @RequestMapping
❌ @Model
❌ @PathVariable
12. Question 12
✔️ @PostMapping and @ModelAttribute
❌ Others
13. Question 13
✔️ @Controller
❌ @Service
❌ @RestController
❌ @Component
14. Question 14
✔️ To inject dependencies automatically
15. Question 15
✔️ Missing view template or incorrect mapping
❌ Others
16. Question 16
✔️ Spring Security
17. Question 17
✔️ To test and debug RESTful APIs
18. Question 18
✔️ A JSON array: [“Task 1”, “Task 2”]
19. Question 19
✔️ 201
20. Question 20
✔️ <select>
21. Question 21
✔️ @Column
22. Question 22
✔️ To package the application with an embedded server
23. Question 23
✔️ @PostMapping(“/register”)
24. Question 24
✔️ <ul>
✔️ <li>
❌ <p>
❌ <ol> (ordered list, question says no numbering)
25. Question 25
✔️ email
❌ text
❌ radio
❌ color
26. Question 26
✔️ align-items
✔️ flex-wrap
✔️ justify-content
❌ grid-template-columns
27. Question 27
✔️ 2px solid
28. Question 28
✔️ 0, 1, 2
29. Question 29
✔️ ResponseEntity.status(200).body(product)
✔️ ResponseEntity.badRequest().body(product)
✔️ ResponseEntity.ok(product)
❌ return product; (invalid for ResponseEntity question)
30. Question 30
✔️ fetch(“trails.urlcom/api/data”)
✔️ fetch(“trails.urlcom/api/data”, { method: “GET” })
❌ method POST
❌ fetchPost(…)
📘 Summary Table
| Q | Answer |
|---|---|
| 1 | True |
| 2 | <body> |
| 3 | False |
| 4 | #header, #main-content |
| 5 | True |
| 6 | total, result, sum |
| 7 | submit |
| 8 | @Post, @Get, @RequestMapping |
| 9 | model.addAttribute(…) |
| 10 | Spring Web |
| 11 | @RequestParam |
| 12 | @PostMapping + @ModelAttribute |
| 13 | @Controller |
| 14 | Dependency injection |
| 15 | Missing view template |
| 16 | Spring Security |
| 17 | API testing |
| 18 | JSON array |
| 19 | 201 |
| 20 | <select> |
| 21 | @Column |
| 22 | Embedded server JAR |
| 23 | @PostMapping |
| 24 | <ul>, <li> |
| 25 | |
| 26 | align-items, flex-wrap, justify-content |
| 27 | 2px solid |
| 28 | 0, 1, 2 |
| 29 | all ResponseEntity options except plain return |
| 30 | fetch(…), fetch(…GET…) |