Bsc Cs Mcq Answers
Bsc Cs Mcq Answers
2. What is the size of an `int` data type in C (on a 32-bit system)? Answer: B) 4 bytes
3. Which operator is used to access the value at the address stored in a pointer variable? Answer:
B) *
4. What is the output of the following code: int a = 5; printf("%d", a++); Answer: A) 5
5. Which function is used to read a string from the user in C? Answer: B) gets()
6. Which data structure uses the FIFO (First In First Out) principle? Answer: B) Queue
7. What is the time complexity of searching an element in a binary search tree (average case)?
Answer: B) O(log n)
8. Which traversal method is used to get the contents of a binary search tree in ascending order?
Answer: B) In-order
9. In a circular queue, the condition for queue full is: Answer: B) (rear + 1) % size == front
11. Which of the following is a valid SQL statement to retrieve all records from a table named
13. Which normal form eliminates transitive dependency? Answer: C) Third Normal Form
15. Which command is used to remove all records from a table in SQL? Answer: D) TRUNCATE
16. Which of the following is not a function of the operating system? Answer: C) Compiler design
17. What is a deadlock? Answer: B) A condition where processes wait indefinitely for resources
18. Which scheduling algorithm gives minimum average waiting time? Answer: B) Shortest Job Next
First-Served
20. Which memory allocation technique suffers from external fragmentation? Answer: C) Contiguous
allocation
21. Which model is also known as the classic life cycle model? Answer: C) Waterfall model
22. Which of the following is not a software development activity? Answer: D) Networking
23. What is the main aim of software testing? Answer: C) Quality assurance
24. Which document defines the user's needs and expectations? Answer: B) SRS
25. What is the first step in the software development life cycle (SDLC)? Answer: C) Requirement
gathering
27. Which layer of the OSI model provides end-to-end communication? Answer: A) Transport
30. HTTP operates at which layer of the OSI model? Answer: A) Application
32. Which HTML tag is used for inserting an image? Answer: A) <img>
34. Which of the following is used to link an external CSS file? Answer: B) <link rel="stylesheet"
href="style.css">
37. What is the main goal of AI? Answer: C) Enable machines to mimic human behavior
39. Which term is used for the ability of a machine to improve its performance by learning from
40. Which algorithm is used in pathfinding problems like in maps or games? Answer: D) All of the
above
41. Who invented the World Wide Web? Answer: C) Tim Berners-Lee
42. Which part of the computer is responsible for processing data? Answer: B) CPU
43. Which file extension is used for a C++ program? Answer: B) .cpp