Core Subject MCQ
Core Subject MCQ
● a) 10
● b) 11
● c) 12
● d) 15
Q17. What is the correct syntax to allocate memory dynamically in C++?
● a) int *ptr = new int;
● b) int ptr = malloc(sizeof(int));
● c) int *ptr = allocate();
● d) int *ptr = create();
7. Data Structures and Algorithms (DSA)
Q18. Which of the following data structures uses LIFO order?
● a) Queue
● b) Stack
● c) Linked List
● d) Tree
Q19. The time complexity of binary search is:
● a) O(n)
● b) O(n²)
● c) O(log n)
● d) O(1)
Q20. Which of the following sorting algorithms has the worst-case time complexity of O(n log n)?
● a) Merge Sort
● b) Insertion Sort
● c) Bubble Sort
● d) Quick Sort
Answers:
1. c) HTTPS
2. b) Transport
3. b) 255.255.255.0
4. b) Shortest Job Next (SJN)
5. b) A page is not present in memory
6. a) ps
7. b) A key that identifies each record uniquely
8. a) SELECT
9. b) MongoDB
10. b) <a>
11. d) All of the above
12. c) Integer
13. a) WHERE
14. a) DELETE FROM table_name
15. d) string
16. b) 11
17. a) int *ptr = new int;
18. b) Stack
19. c) O(log n)
20. a) Merge Sort