First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Technology
In a computer, which component is primarily responsible for temporarily holding the program currently being executed and the data it is working on?
- Main memory (RAM) Correct answer.
- Optical disc drive
- Hard disk drive
- Power supply unit
Explanation
Main memory is directly addressable by the CPU and stores the instructions and data of running programs; its contents are volatile and lost on power-off. Secondary storage such as disks keeps data permanently but is far slower and not directly executed from.
Question 2Technology
A CPU fetches an instruction, decodes it, and then executes it. What is the standard name for this repeating sequence of steps?
- Direct memory access cycle
- Interrupt handling cycle
- Pipelining cycle
- Fetch-decode-execute cycle Correct answer.
Explanation
The fetch-decode-execute cycle (also called the instruction cycle) is the fundamental sequence by which a processor retrieves an instruction from memory, interprets its operation code, and carries it out. Pipelining overlaps these stages but does not define them.
Question 3Technology
Which numbering system uses only the digits 0 and 1 and is the native representation of data inside digital circuits?
- Decimal
- Octal
- Hexadecimal
- Binary Correct answer.
Explanation
Binary uses base 2, so each digit is either 0 or 1, which maps directly onto the two stable voltage states of digital logic. Octal and hexadecimal are compact shorthand notations for groups of bits, not the circuit's native form.
Question 4Technology
What is the decimal value of the binary number 101101?
- 43
- 45 Correct answer.
- 46
- 53
Explanation
Sum the place values of the set bits: 32 + 8 + 4 + 1 = 45. Each position corresponds to a power of two, so 101101 in base 2 equals 45 in base 10.
Question 5Technology
In relational database terminology, what does a primary key guarantee about a table?
- Rows can be deleted only after the key is changed
- Every column contains only numeric values
- Every row is uniquely identified and the key value cannot be null Correct answer.
- The table is automatically sorted by that column on disk
Explanation
A primary key enforces both uniqueness and the entity integrity rule that its value is never null, so each row can be identified unambiguously. Physical row ordering and column data types are unrelated to the key constraint.
Question 6Technology
Which SQL clause is used to filter rows after grouping has been performed?
- GROUP BY
- ORDER BY
- WHERE
- HAVING Correct answer.
Explanation
HAVING applies a condition to groups produced by GROUP BY, whereas WHERE filters individual rows before grouping. ORDER BY only sorts the result set.
Question 7Technology
Which protocol operates at the transport layer and provides reliable, connection-oriented delivery with acknowledgements and retransmission?
- ICMP
- UDP
- ARP
- TCP Correct answer.
Explanation
TCP establishes a connection through a handshake and uses sequence numbers, acknowledgements, and retransmission to guarantee ordered, reliable delivery. UDP is connectionless and offers no such guarantees.
Question 8Technology
What is the primary purpose of a firewall placed at the boundary of a corporate network?
- To translate domain names into IP addresses
- To control traffic entering and leaving according to security rules Correct answer.
- To increase the bandwidth of the internal LAN
- To assign IP addresses to internal hosts
Explanation
A firewall inspects packets crossing a trust boundary and permits or blocks them according to configured rules, enforcing the security policy. Bandwidth, address assignment, and name resolution are functions of other devices.
Question 9Technology
In software testing, which level verifies the interaction between two or more completed modules by exercising their interfaces?
- Unit testing
- Regression testing
- Acceptance testing
- Integration testing Correct answer.
Explanation
Integration testing focuses on the interfaces and data flow between combined modules, exposing defects that unit tests cannot see. Unit testing isolates a single module, and acceptance testing validates fitness for the user.
Question 10Technology
An 8-bit register currently holds the unsigned value 00001111. After a logical left shift by one bit, what value does it hold?
- 00011110 Correct answer.
- 00011111
- 10001111
- 00000111
Explanation
A logical left shift moves every bit one position toward the most significant end, inserts 0 at the least significant position, and discards the bit shifted out. Thus 00001111 becomes 00011110, which equals 30, i.e., double the original 15.
Question 11Technology
Using two's complement representation with 8 bits, what is the result of computing 5 + (-9)?
- 11111100 (-4) Correct answer.
- 00001100 (12)
- 11110100 (-12)
- 00000100 (4)
Explanation
In 8-bit two's complement, -9 is 11110111. Adding 00000101 gives 11111100, which is the two's complement encoding of -4. The carry out of the sign position is discarded.
Question 12Technology
Which cache mapping scheme allows a block of main memory to be placed in any line of the cache, requiring a tag comparison against every line?
- Fully associative mapping Correct answer.
- Sector mapping
- Direct mapping
- Set-associative mapping
Explanation
Fully associative caches let any memory block occupy any cache line, so the tag must be compared with all line tags in parallel. Direct mapping fixes one line per block, and set-associative mapping restricts a block to one set.
Question 13Technology
A process is in the ready state. Which event moves it to the running state?
- Its time slice expires
- The scheduler dispatches it to the CPU Correct answer.
- It issues an I/O request
- It waits for a semaphore
Explanation
The ready-to-running transition occurs when the scheduler selects the process and assigns the CPU to it. Issuing I/O or waiting on a semaphore moves a running process to the waiting state, and an expired time slice returns it to ready.
Question 14Technology
Which condition is one of the four necessary conditions for a deadlock to occur?
- Preemption of held resources
- Priority inversion
- Starvation of a low-priority process
- Circular wait among processes Correct answer.
Explanation
The four Coffman conditions are mutual exclusion, hold and wait, no preemption, and circular wait; all must hold simultaneously for deadlock. Priority inversion and starvation are scheduling phenomena, not deadlock conditions.
Question 15Technology
In a relational schema, a foreign key in table A referencing table B enforces which rule?
- Each value in the foreign key must match a primary key value in B or be null Correct answer.
- The foreign key column must be indexed with a hash table
- Deleting a row in B always deletes matching rows in A
- Every row of A must have a distinct foreign key value
Explanation
Referential integrity requires that a foreign key value either match an existing candidate key value in the referenced table or be null when permitted. Uniqueness is a property of primary keys, and cascade deletion is an optional behavior, not a rule of the constraint.
Question 16Technology
A relation is in third normal form (3NF) when it is in 2NF and which additional condition holds?
- Every determinant is a candidate key
- No non-prime attribute is transitively dependent on a candidate key Correct answer.
- Every attribute is atomic
- All multivalued dependencies are removed
Explanation
3NF removes transitive dependencies of non-prime attributes on candidate keys, building on 2NF's removal of partial dependencies. Atomicity defines 1NF, and the candidate-key determinant rule characterizes BCNF.
Question 17Technology
A subnet uses the address 192.168.10.0 with mask 255.255.255.192. How many usable host addresses does this subnet provide?
- 64
- 126
- 30
- 62 Correct answer.
Explanation
The mask 255.255.255.192 leaves 6 host bits, giving 2^6 = 64 addresses, of which the network and broadcast addresses are reserved, so 62 are usable. A /27 prefix corresponds to this mask.
Question 18Technology
Which statement best describes the role of DNS in the Internet?
- It routes packets between autonomous systems
- It maps human-readable domain names to IP addresses Correct answer.
- It encrypts traffic between web browsers and servers
- It assigns dynamic IP addresses to hosts joining a network
Explanation
DNS is a distributed hierarchical database that resolves domain names into IP addresses so applications can reach hosts. Address assignment is DHCP's role, encryption is provided by TLS, and inter-domain routing is BGP's role.
Question 19Technology
A symmetric encryption scheme is used to protect a large data transfer. What is the main reason symmetric ciphers are preferred over public-key ciphers for bulk data?
- They provide non-repudiation by design
- They eliminate the need for key distribution
- They require no shared secret between parties
- They compute far faster for large volumes of data Correct answer.
Explanation
Symmetric algorithms such as AES perform far fewer operations per block than public-key algorithms, making them suitable for bulk encryption. Their drawback is that both parties must share a secret key securely.
Question 20Technology
In the TCP three-way handshake, which sequence of control flags is exchanged to establish a connection?
- SYN, ACK, RST
- FIN, ACK, FIN-ACK
- SYN, SYN-ACK, ACK Correct answer.
- ACK, SYN, FIN
Explanation
The client sends SYN, the server replies with SYN and ACK, and the client completes with ACK, synchronizing sequence numbers in both directions. FIN flags are used for connection termination rather than establishment.
Question 21Technology
In object-oriented design, which principle states that a subclass should be substitutable for its superclass without altering the correctness of the program?
- Dependency inversion principle
- Single responsibility principle
- Liskov substitution principle Correct answer.
- Open-closed principle
Explanation
The Liskov substitution principle requires that objects of a derived class behave so that any code written for the base class still works correctly. It constrains inheritance relationships, whereas the other principles address module structure and dependencies.
Question 22Technology
An algorithm's running time satisfies T(n) = 3n^2 + 20n + 500. Which Big-O class describes its growth rate?
- O(log n)
- O(n^2) Correct answer.
- O(n)
- O(n^3)
Explanation
Big-O keeps only the dominant term and discards constant factors, so the n^2 term determines the growth class, giving O(n^2). Lower-order terms and constants are irrelevant as n grows large.
Question 23Technology
A binary search is applied to a sorted array of 1,000 elements. Approximately how many comparisons are needed in the worst case?
- 10 Correct answer.
- 100
- 1,000
- 500
Explanation
Binary search halves the remaining search interval each step, so the worst case is about log2(1000), which is close to 10 comparisons. Linear search would require up to 1,000 comparisons.
Question 24Technology
A system uses 32-bit virtual addresses, 4 KiB pages, and a single-level page table with one entry per virtual page. How many page table entries are required?
- 65,536
- 4,096
- 1,048,576 Correct answer.
- 262,144
Explanation
A 4 KiB page means a 12-bit offset, leaving 20 bits for the page number, so 2^20 = 1,048,576 entries are needed. Single-level tables of this size motivate multi-level page tables.
Question 25Technology
A CPU has a 4-stage pipeline and each stage takes 1 ns. Ignoring hazards and overhead, how long does it take to complete 100 instructions compared with a non-pipelined processor that needs 4 ns per instruction?
- 400 ns versus 100 ns
- 103 ns versus 400 ns Correct answer.
- 25 ns versus 400 ns
- 100 ns versus 400 ns
Explanation
A k-stage pipeline finishes the first instruction after k cycles and then one instruction per cycle, so 100 instructions take (4 + 99) = 103 cycles, or 103 ns. The non-pipelined processor needs 100 x 4 = 400 ns, giving a speedup near 3.9.
Question 26Technology
Which access control model assigns permissions to users based on their job function within an organization, rather than on individual ownership of resources?
- Role-based access control (RBAC) Correct answer.
- Discretionary access control (DAC)
- Access control list (ACL)
- Mandatory access control (MAC)
Explanation
RBAC grants access according to roles that correspond to job responsibilities, so permissions are managed at the role level rather than per user. DAC lets resource owners set permissions, while MAC uses system-wide labels. An ACL is a mechanism, not a model, and can be used within DAC or MAC.
Question 27Technology
In a relational database, which property of transactions guarantees that once a transaction commits, its changes persist even if the system crashes immediately afterward?
- Consistency
- Isolation
- Atomicity
- Durability Correct answer.
Explanation
Durability ensures that committed changes are written to non-volatile storage and survive subsequent failures. Atomicity concerns all-or-nothing execution, consistency preserves integrity constraints, and isolation prevents interference between concurrent transactions.
Question 28Technology
In the context of software development process models, which model is characterized by iterative cycles called sprints, each producing a potentially shippable product increment?
- Scrum Correct answer.
- Waterfall model
- Spiral model
- V-model
Explanation
Scrum is an agile framework that organizes work into fixed-length sprints, each ending with a product increment that can be released. Waterfall and V-model are sequential, and the spiral model is risk-driven with distinct phases, not short fixed sprints.
Question 29Technology
Which type of software testing is performed by developers to check individual units or components in isolation, often using stubs and drivers?
- Integration testing
- System testing
- Unit testing Correct answer.
- Acceptance testing
Explanation
Unit testing targets the smallest testable pieces of code, such as functions or classes, and uses stubs and drivers to replace dependencies. Integration testing checks interactions between units, system testing checks the whole system, and acceptance testing checks fitness for use by the customer.
Question 30Technology
In a UML class diagram, which relationship is depicted with an open arrowhead and indicates that one class uses another class as a parameter or local variable without storing a reference to it?
- Aggregation
- Composition
- Dependency Correct answer.
- Association
Explanation
A dependency is a weak, temporary relationship shown as a dashed line with an open arrowhead; it often means one class calls methods on another or uses it as a parameter. Association is a structural link, aggregation is a whole-part relationship with shared lifetime, and composition is a stronger whole-part relationship with exclusive ownership.
Question 31Technology
Which of the following is an example of an application-layer protocol used for retrieving email from a server while keeping messages on the server?
- SMTP
- RTP
- SNMP
- IMAP Correct answer.
Explanation
IMAP allows a client to access and manage email stored on a server, typically leaving messages on the server. SMTP is for sending email, SNMP is for network management, and RTP is for real-time media transport.
Question 32Technology
Which of the following is a characteristic of a solid-state drive (SSD) that distinguishes it from a magnetic hard disk drive (HDD)?
- It stores data by magnetizing a rotating platter.
- It uses flash memory with no moving parts. Correct answer.
- It requires defragmentation to maintain performance.
- It has moving read/write heads that must seek to a track.
Explanation
SSDs use NAND flash memory and have no moving mechanical components, which gives them faster random access and greater shock resistance. HDDs store data magnetically on rotating platters and use moving heads, and they benefit from defragmentation, whereas SSDs do not.
Question 33Technology
In a relational database, which SQL statement is used to remove a table definition and all its data from the database permanently?
- DROP TABLE table_name; Correct answer.
- TRUNCATE TABLE table_name;
- ALTER TABLE table_name DROP COLUMN column_name;
- DELETE FROM table_name;
Explanation
DROP TABLE removes the table structure and its data from the schema. DELETE removes rows but keeps the table, TRUNCATE removes all rows but keeps the table structure, and ALTER TABLE ... DROP COLUMN removes only a column.
Question 34Technology
A CPU uses a direct-mapped cache with 64 lines, and each cache line holds 16 bytes. What is the total size of the cache in bytes?
- 512 bytes
- 4096 bytes
- 64 bytes
- 1024 bytes Correct answer.
Explanation
Total cache size equals the number of lines multiplied by the line size: 64 lines × 16 bytes per line = 1024 bytes. The other values result from misapplying the multiplication or confusing lines with bytes.
Question 35Technology
Consider the following pseudocode:
int sum = 0;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= i; j++) {
sum = sum + 1;
}
}
What is the total number of times the statement sum = sum + 1 executes?
- n^2
- n
- 2^n
- n(n+1)/2 Correct answer.
Explanation
The inner loop runs i times for each i from 1 to n, so the total is 1 + 2 + ... + n = n(n+1)/2. This is quadratic growth but with half the constant factor of n^2.
Question 36Technology
A process uses a page table where each entry is 4 bytes. The system has a 32-bit virtual address space and pages of 4 KiB. If a single-level page table is used, what is the size of the page table for one process?
- 4 MiB Correct answer.
- 4 KiB
- 16 MiB
- 1 MiB
Explanation
With 4 KiB pages and a 32-bit address space, the number of virtual pages is 2^32 / 2^12 = 2^20. Each entry is 4 bytes, so the table size is 2^20 × 4 bytes = 2^22 bytes = 4 MiB.
Question 37Technology
A subnet has the network address 172.16.0.0 and the subnet mask 255.255.240.0. How many usable host addresses does this subnet provide?
- 4094 Correct answer.
- 4096
- 2046
- 8190
Explanation
The mask 255.255.240.0 has 20 network bits and 12 host bits, giving 2^12 = 4096 total addresses. Subtracting the network and broadcast addresses leaves 4094 usable host addresses.
Question 38Technology
In public-key cryptography, which key is used to verify a digital signature created with a user's private key?
- The signer's private key
- A shared symmetric key
- The recipient's public key
- The signer's public key Correct answer.
Explanation
A digital signature is verified with the public key that corresponds to the private key used to sign. The private key must remain secret, and the recipient's keys or a symmetric key are not used for verification in standard public-key signature schemes.
Question 39Technology
A CPU has a 5-stage pipeline and each stage takes 2 ns. Ignoring hazards and overhead, how long does it take to complete 100 independent instructions?
- 208 ns Correct answer.
- 200 ns
- 1000 ns
- 210 ns
Explanation
The first instruction takes 5 stages × 2 ns = 10 ns. Each subsequent instruction completes one per cycle, adding 99 × 2 ns = 198 ns, for a total of 208 ns. This is the standard pipeline completion time formula (k + n - 1) × cycle time.
Question 40Technology
In a relational schema, which normal form requires that every non-prime attribute be non-transitively dependent on every candidate key?
- Third normal form (3NF) Correct answer.
- Second normal form (2NF)
- Boyce-Codd normal form (BCNF)
- First normal form (1NF)
Explanation
3NF eliminates transitive dependencies of non-prime attributes on candidate keys, in addition to being in 2NF. 1NF requires atomic values, 2NF removes partial dependencies, and BCNF is stricter, requiring every determinant to be a candidate key.
Question 41Technology
Which of the following best describes the purpose of the Address Resolution Protocol (ARP) in an IPv4 network?
- To translate private IP addresses to public IP addresses for Internet access
- To resolve a domain name to an IP address
- To assign a dynamic IP address to a host from a pool
- To map a known IP address to the corresponding MAC address on the local link Correct answer.
Explanation
ARP broadcasts a request asking which MAC address owns a given IP address on the local network, and the reply provides the mapping used to build the frame. DHCP assigns IP addresses, NAT translates addresses, and DNS resolves names to IP addresses.
Question 42Technology
In software design, which design pattern ensures that a class has only one instance and provides a global point of access to it?
- Singleton Correct answer.
- Observer
- Factory Method
- Adapter
Explanation
The Singleton pattern restricts instantiation of a class to one object and supplies a static method to retrieve that instance. Factory Method delegates object creation, Observer defines a one-to-many dependency for notifications, and Adapter converts one interface into another.
Question 43Technology
A system uses 8-bit two's complement representation. What is the decimal value of the bit pattern 11110010?
- -15
- -13
- -14 Correct answer.
- 242
Explanation
In 8-bit two's complement, the most significant bit has weight -128. The remaining bits 1110010 contribute 64+32+16+2 = 114, so the value is -128 + 114 = -14. Alternatively, invert the bits and add one: 00001110 = 14, so the value is -14.
Question 44Technology
Which of the following is a primary advantage of using a relational database with ACID transactions over a simple file-based system for a banking application?
- It guarantees that concurrent transactions do not interfere and that failures do not leave partial updates. Correct answer.
- It eliminates the need for backups.
- It removes the need for indexing to achieve fast queries.
- It automatically encrypts all data at rest without configuration.
Explanation
ACID properties-atomicity, consistency, isolation, and durability-ensure that concurrent operations are isolated and that a failure does not leave the database in a partially updated state. Backups, encryption, and indexing remain necessary and are not provided automatically by ACID alone.
Question 45Technology
In a paging system, what is the primary purpose of the translation lookaside buffer (TLB)?
- To perform the actual reading and writing of data to the disk
- To hold the page table for the entire system in main memory
- To manage the allocation of frames to processes
- To store recently used page table entries and speed up virtual-to-physical address translation Correct answer.
Explanation
The TLB is a small, fast cache of page table entries that avoids a full page table walk for most accesses. The page table itself resides in memory, disk I/O is handled by device drivers and hardware, and frame allocation is a function of the operating system's memory manager.
Question 46Technology
Which scheduling algorithm can lead to starvation of long processes because it always selects the process with the smallest estimated remaining time?
- First-Come, First-Served (FCFS)
- Round Robin (RR)
- First-In, First-Out (FIFO)
- Shortest Remaining Time First (SRTF) Correct answer.
Explanation
SRTF is the preemptive version of shortest job first and always runs the process with the least remaining time, so long jobs may be repeatedly preempted and never finish. FCFS and FIFO are non-preemptive and order by arrival, and Round Robin gives each process a time slice, preventing starvation.
Question 47Technology
In public-key infrastructure, which component is responsible for issuing and signing digital certificates that bind a public key to an identity?
- Certificate authority (CA) Correct answer.
- Registration authority (RA)
- Relying party
- Validation authority (VA)
Explanation
The certificate authority signs certificates, thereby vouching for the binding between a public key and the subject identity. An RA verifies identity before issuance, a VA checks revocation status, and the relying party is the entity that trusts the certificate.
Question 48Technology
A software module must be modified to fix a defect, but the change should not alter its external behavior. Which type of maintenance is being performed?
- Perfective maintenance
- Adaptive maintenance
- Preventive maintenance
- Corrective maintenance Correct answer.
Explanation
Corrective maintenance involves fixing discovered faults while preserving the intended external behavior. Adaptive maintenance responds to environmental changes, perfective maintenance improves performance or maintainability, and preventive maintenance reduces future risk.
Question 49Technology
In a relational database, consider the relation R(A, B, C, D) with functional dependencies A → B, B → C, and C → D. Which of the following is a candidate key for R?
- A Correct answer.
- B
- D
- C
Explanation
A determines B, B determines C, and C determines D, so A determines all attributes. No proper subset of A can determine all attributes because A is a single attribute, so A is a candidate key. B, C, and D cannot determine A, so they are not candidate keys.
Question 50Technology
A CPU has a 2-way set-associative cache with 128 sets and a block size of 32 bytes. How many bits are used for the set index in a physical address?
- 6 bits
- 5 bits
- 7 bits Correct answer.
- 8 bits
Explanation
With 128 sets, the set index requires log2(128) = 7 bits. The block offset requires log2(32) = 5 bits, but the question asks only for the set index. The associativity does not change the number of index bits.