Time 2
Time 2
Time 2
c
Copy code
int x = 5;
printf("%d", x++);
1.
○ a) 4
○ b) 5
○ c) 6
○ d) Compilation Error
Answer: b) 5
2. What is the size of an int in C?
○ a) 2 bytes
○ b) 4 bytes
○ c) Depends on the platform
○ d) 8 bytes
Answer: c) Depends on the platform
3. Which of the following is a valid declaration of a pointer?
○ a) int *ptr;
○ b) int ptr*;
○ c) *int ptr;
○ d) None of the above
Answer: a) int *ptr;
4. Which sorting algorithm is the fastest in the average case?
○ a) Bubble Sort
○ b) Quick Sort
○ c) Merge Sort
○ d) Insertion Sort
Answer: b) Quick Sort
5. What is the time complexity of searching an element in a Binary Search Tree
(BST) in the worst case?
○ a) O(log n)
○ b) O(n)
○ c) O(n log n)
○ d) O(1)
Answer: b) O(n)
6.
○ a) [1, 2]
○ b) [1]
○ c) [2]
○ d) [2, 3]
Answer: c) [2]
Data Structures
16. Which of the following SQL clauses is used to fetch unique records from a
table?
○ a) SELECT DISTINCT
○ b) SELECT UNIQUE
○ c) SELECT PRIMARY
○ d) SELECT DIFFERENT
Answer: a) SELECT DISTINCT
17. What is the purpose of the JOIN operation in SQL?
○ a) To combine rows from two or more tables
○ b) To delete records
○ c) To filter records
○ d) To update records
Answer: a) To combine rows from two or more tables
18. What is the primary key used for in a database?
○ a) To store large data types
○ b) To uniquely identify each record
○ c) To relate two tables
○ d) To store sequential data
Answer: b) To uniquely identify each record
What is the output of the following SQL query?
sql
Copy code
SELECT COUNT(*) FROM Employees WHERE age > 30;
19.
○ a) A list of employees with age greater than 30
○ b) The count of employees with age greater than 30
○ c) Employees sorted by age
○ d) None of the above
Answer: b) The count of employees with age greater than 30
20. Which normal form eliminates partial dependency?
○ a) First Normal Form (1NF)
○ b) Second Normal Form (2NF)
○ c) Third Normal Form (3NF)
○ d) Boyce-Codd Normal Form (BCNF)
Answer: b) Second Normal Form (2NF)
Operating Systems
Networking
Cloud Computing
● a) 5 10
● b) 10 5
● c) 0 10
● d) 15 5
Answer: d) 15 5
● a) Stack
● b) Queue
● c) Array
● d) Linked List
Answer: a) Stack
● a) [1, 2, 3]
● b) [2, 3, 4]
● c) [2, 3]
● d) [3, 4, 5]
Answer: b) [2, 3, 4]
● a) malloc()
● b) new
● c) calloc()
● d) realloc()
Answer: b) new
37. In which case does the worst-case scenario of Quick Sort occur?
38. What is the advantage of AVL trees over binary search trees (BST)?
● a) O(n)
● b) O(log n)
● c) O(n log n)
● d) O(1)
Answer: b) O(log n)
● a) UPDATE
● b) MODIFY
● c) CHANGE
● d) INSERT
Answer: a) UPDATE
● a) Round Robin
● b) Shortest Job First
● c) First-Come-First-Served (FCFS)
● d) Priority Scheduling
Answer: c) First-Come-First-Served (FCFS)
● a) Physical Layer
● b) Data Link Layer
● c) Network Layer
● d) Transport Layer
Answer: d) Transport Layer
45. What is the maximum number of children that a binary tree node can
have?
● a) 1
● b) 2
● c) 3
● d) 4
Answer: b) 2
● a) Public Cloud
● b) Private Cloud
● c) Hybrid Cloud
● d) Managed Cloud
Answer: d) Managed Cloud
● a) Cost efficiency
● b) Scalability
● c) Accessibility
● d) All of the above
Answer: d) All of the above
● a) Relational Database
● b) Column-family Store
● c) XML Database
● d) SQL Database
Answer: b) Column-family Store
● a) Software as a System
● b) Software and Application Services
● c) Software as a Service
● d) System as a Service
Answer: c) Software as a Service