BCS Bachelor of Computer Science Degree 5 — Questions and Answers
Question 1: In software engineering, what is the purpose of the 'Agile' development methodology?
- To complete all planning before any coding begins
- To deliver working software incrementally through iterative development (Correct answer)
- To separate development and operations teams for efficiency
- To document requirements exhaustively before implementation
Correct answer: To deliver working software incrementally through iterative development
Agile focuses on iterative development, delivering working software in short cycles called sprints with continuous feedback.
Question 2: Which data structure would be most efficient for implementing a priority queue?
- Linked List
- Array
- Heap (Correct answer)
- Hash Table
Correct answer: Heap
A Heap (typically a binary heap) provides O(log n) insertion and O(1) peek operations, making it ideal for priority queues.
Question 3: In the context of TCP/IP, what is the purpose of the three-way handshake?
- To encrypt data before transmission
- To establish a reliable connection between client and server (Correct answer)
- To fragment large packets for routing
- To authenticate the identity of both parties
Correct answer: To establish a reliable connection between client and server
The TCP three-way handshake (SYN, SYN-ACK, ACK) establishes a reliable connection and synchronizes sequence numbers.
Question 4: What is Big Data's '3 Vs' model used to characterize?
- Speed, Cost, and Quality of data processing
- Volume, Velocity, and Variety of data (Correct answer)
- Validation, Verification, and Visualization
- Virtual, Volatile, and Variable storage
Correct answer: Volume, Velocity, and Variety of data
The 3 Vs of Big Data are Volume (amount), Velocity (speed), and Variety (diversity of data types).
Question 5: In version control with Git, what does the command 'git rebase' do?
- Creates a new branch from the current commit
- Moves or replays commits onto a new base commit (Correct answer)
- Merges two branches creating a merge commit
- Reverts the repository to a previous state
Correct answer: Moves or replays commits onto a new base commit
Git rebase moves a sequence of commits to begin at a new base commit, creating a linear project history.
Question 6: Which theorem in computer science proves that some problems cannot be solved by any algorithm?
- P vs NP Theorem
- CAP Theorem
- Halting Problem (Correct answer)
- Church-Turing Thesis
Correct answer: Halting Problem
The Halting Problem, proved by Alan Turing, demonstrates that no algorithm can determine whether an arbitrary program will halt or run forever.
Question 7: What is the role of an Abstract Syntax Tree (AST) in compiler design?
- To manage memory allocation during program execution
- To represent the hierarchical structure of source code after parsing (Correct answer)
- To optimize machine code for a specific CPU architecture
- To link multiple object files into an executable
Correct answer: To represent the hierarchical structure of source code after parsing
An AST represents the syntactic structure of source code as a tree, with each node denoting a language construct.
In software engineering, what is the purpose of the 'Agile' development methodology?