BCS Bachelor of Computer Science Degree MCQ 5 ā Questions and Answers
Question 1: Which machine learning technique is used when labeled training data is unavailable?
- Supervised Learning
- Reinforcement Learning
- Unsupervised Learning (Correct answer)
- Transfer Learning
Correct answer: Unsupervised Learning
Unsupervised learning finds patterns in data without labeled examples, using methods like clustering and dimensionality reduction.
Question 2: What does the principle of 'separation of concerns' advocate in software design?
- Combining all related functionality into one module for simplicity
- Dividing a program into distinct sections, each addressing a separate concern (Correct answer)
- Ensuring all modules communicate through a single interface
- Keeping all business logic in the database layer
Correct answer: Dividing a program into distinct sections, each addressing a separate concern
Separation of concerns divides software into distinct sections (e.g., UI, logic, data) so each handles a specific responsibility.
Question 3: Which of the following best describes a deadlock in an operating system?
- A process consuming 100% CPU indefinitely
- A set of processes each waiting for a resource held by another in the set (Correct answer)
- A memory overflow causing a system crash
- A scheduling priority inversion between two threads
Correct answer: A set of processes each waiting for a resource held by another in the set
Deadlock occurs when a group of processes are permanently blocked because each holds a resource that another process in the group needs.
Question 4: In computer networks, what is the difference between a hub and a switch?
- A hub operates at Layer 3; a switch at Layer 2
- A hub broadcasts to all ports; a switch forwards to specific ports using MAC addresses (Correct answer)
- A hub uses IP addresses; a switch uses MAC addresses for routing
- A hub is faster than a switch due to simpler hardware
Correct answer: A hub broadcasts to all ports; a switch forwards to specific ports using MAC addresses
A hub broadcasts incoming frames to all ports while a switch learns MAC addresses and forwards frames only to the destination port.
Question 5: What is the time complexity of accessing an element by index in an array?
- O(n)
- O(log n)
- O(1) (Correct answer)
- O(n²)
Correct answer: O(1)
Array index access is O(1) because the memory address is computed directly from the base address and index using arithmetic.
Question 6: Which software development methodology emphasizes iterative delivery, customer collaboration, and responding to change?
- Waterfall
- Agile (Correct answer)
- V-Model
- Spiral Model
Correct answer: Agile
Agile methodologies (e.g., Scrum, Kanban) prioritize iterative development, continuous feedback, and adaptability over rigid planning.
Question 7: In Boolean algebra, which law states that A + (B Ā· C) = (A + B) Ā· (A + C)?
- De Morgan's Law
- Absorption Law
- Distributive Law (Correct answer)
- Complement Law
Correct answer: Distributive Law
The Distributive Law in Boolean algebra allows OR to distribute over AND (and vice versa), similar to arithmetic distribution.
Which machine learning technique is used when labeled training data is unavailable?