Computer Science-Practice-2
Prepare for Computer Science examinations with 25 fresh solved MCQs covering computer architecture, operating systems, DBMS, networking, algorithms, programming and cybersecurity. Includes correct answers and explanations.
Practice questions
- Which technique allows a CPU to execute multiple instruction stages simultaneously?
- Multiprocessing
- Pipelining
- Paging
- Spooling
- What is the primary function of Direct Memory Access (DMA)?
- To encrypt memory contents
- To allow devices to transfer data to or from memory with limited CPU intervention
- To increase monitor resolution
- To convert source code into machine code
- Which cache mapping technique allows a memory block to be placed in any cache line?
- Direct mapping
- Fully associative mapping
- Fixed mapping
- Sequential mapping
- Which RAID level uses mirroring to provide data redundancy?
- RAID 0
- RAID 1
- RAID 5
- RAID 6
- Which operating system mechanism is commonly used to control access to shared resources?
- Semaphore
- Compiler
- Loader
- Assembler
- What is thrashing in an operating system?
- Excessive page swapping that reduces system performance
- Permanent deletion of system files
- Failure of the keyboard
- Repeated execution of a compiler
- In a Unix-like operating system, what does an inode primarily store?
- The actual file name only
- File metadata and pointers to data blocks
- User passwords in plain text
- Network routing information
- Which operating system interface allows a program to request services from the kernel?
- System call
- Spreadsheet
- Device monitor
- Web browser
- Which normal form eliminates partial functional dependencies on a candidate key?
- First Normal Form
- Second Normal Form
- Third Normal Form
- Fourth Normal Form
- Which database key uniquely identifies each record in a table and does not allow NULL values?
- Foreign Key
- Primary Key
- Alternate Attribute
- Composite Index
- What is the main purpose of a foreign key in a relational database?
- To encrypt database records
- To establish a relationship between tables
- To automatically delete every table
- To increase processor speed
- Which SQL clause is used to filter grouped results after applying aggregate functions?
- WHERE
- ORDER BY
- HAVING
- DISTINCT
- What is a database view?
- A virtual table based on a query
- A physical network device
- A database backup file
- A programming language
- Which protocol is responsible for resolving an IPv4 address to a MAC address on a local network?
- DNS
- ARP
- SMTP
- FTP
- What is the primary purpose of a subnet mask in IPv4 networking?
- To identify the network and host portions of an IP address
- To encrypt transmitted data
- To assign domain names
- To identify the physical location of a computer
- Which sequence correctly represents the TCP three-way handshake?
- ACK, SYN, FIN
- SYN, SYN-ACK, ACK
- FIN, ACK, SYN
- SYN, FIN, RST
- Which transport-layer protocol provides connectionless communication?
- TCP
- UDP
- HTTP
- FTP
- Which protocol is commonly used by email clients to retrieve and synchronize messages from a mail server?
- IMAP
- DHCP
- SNMP
- ARP
- What is the primary function of a firewall?
- To increase hard disk capacity
- To monitor and control network traffic according to security rules
- To compile application programs
- To repair damaged processors
- What does a VLAN primarily accomplish in a switched network?
- It increases the physical size of a switch
- It creates logically separate broadcast domains
- It replaces all IP addresses
- It converts wired networks into wireless networks
- Which sorting algorithm uses the divide-and-conquer approach by repeatedly dividing an array into halves and merging sorted portions?
- Bubble Sort
- Selection Sort
- Merge Sort
- Linear Search
- Which graph algorithm finds shortest paths from a source vertex in a weighted graph with non-negative edge weights?
- Dijkstra's Algorithm
- Binary Search
- Insertion Sort
- Kruskal's Algorithm
- In programming, what is recursion?
- A function calling itself
- A program deleting its own source code
- A method of encrypting files
- A process of converting binary into decimal
- Which programming concept allows a program to handle runtime errors without abruptly terminating?
- Inheritance
- Exception Handling
- Compilation
- Data Sorting
- Which cryptographic technique uses a public key and a corresponding private key?
- Symmetric encryption
- Asymmetric cryptography
- Simple substitution
- Data compression
MM Academy