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 1Computer Science content domain (as enumerated in the official 194 framework)
Which logic gate produces a HIGH output only when both of its inputs are HIGH?
- OR gate
- AND gate Correct answer.
- XOR gate
- NOR gate
Explanation
An AND gate outputs 1 only when every input is 1; if any input is 0 the output is 0. OR outputs 1 when at least one input is 1, XOR outputs 1 when inputs differ, and NOR is the inverse of OR.
Question 2Computer Science content domain (as enumerated in the official 194 framework)
In a binary number system, what is the decimal value of the unsigned binary number 10110?
- 18
- 22 Correct answer.
- 20
- 26
Explanation
Evaluate place values from left to right: 16 + 0 + 4 + 2 + 0 = 22. Each position represents a power of two, so 10110 equals 16 + 4 + 2.
Question 3Computer Science content domain (as enumerated in the official 194 framework)
A programmer wants a loop that may execute zero times depending on a condition evaluated before each iteration. Which control structure fits best?
- A while loop Correct answer.
- A switch statement
- A do-while loop
- A for-each loop over a fixed array
Explanation
A while loop tests its condition before the body runs, so the body can execute zero times if the condition is initially false. A do-while always runs at least once because its test comes after the body.
Question 4Computer Science content domain (as enumerated in the official 194 framework)
Which of the following best describes the purpose of a compiler?
- It executes source code one statement at a time without producing an executable
- It stores variable values in memory during program execution
- It links object files into a single executable image
- It translates a high-level source program into machine code before execution Correct answer.
Explanation
A compiler translates an entire high-level source file into machine-level object code before the program runs. Interpretation and linking are separate activities handled by interpreters and linkers.
Question 5Computer Science content domain (as enumerated in the official 194 framework)
What is the primary function of the Domain Name System (DNS) in a network?
- Assigning dynamic IP addresses to client devices
- Translating human-readable host names into IP addresses Correct answer.
- Encrypting traffic between a client and a web server
- Routing packets between autonomous systems
Explanation
DNS resolves host names such as a website's name into the numeric IP addresses that routers use. Address assignment is handled by DHCP, encryption by protocols such as TLS, and inter-network routing by routers and BGP.
Question 6Computer Science content domain (as enumerated in the official 194 framework)
Which data structure follows a last-in, first-out (LIFO) access policy?
- Binary search tree
- Stack Correct answer.
- Queue
- Linked list
Explanation
A stack pushes and pops at the same end, so the most recently added item is removed first. A queue is first-in, first-out, while linked lists and trees allow access by position or key rather than LIFO order.
Question 7Computer Science content domain (as enumerated in the official 194 framework)
Which of the following is an example of a primary storage device in a computer system?
- A USB flash drive
- An optical disc
- Random access memory (RAM) Correct answer.
- A solid-state drive (SSD)
Explanation
Primary storage is directly accessible by the CPU and holds currently executing programs and data; RAM serves this role. SSDs, USB drives, and optical discs are secondary storage that persists data but is not directly addressable as working memory.
Question 8Computer Science content domain (as enumerated in the official 194 framework)
Which of the following is the binary representation of the decimal number 13?
- 1110
- 1001
- 1101 Correct answer.
- 1011
Explanation
Thirteen equals 8 + 4 + 1, so bits are set in the 8's, 4's, and 1's places, giving 1101. The other patterns sum to different decimal values.
Question 9Computer Science content domain (as enumerated in the official 194 framework)
A student writes the Boolean expression A AND (B OR C). Under which single assignment of inputs is the expression TRUE when A is FALSE?
- No assignment, because the expression is always FALSE when A is FALSE Correct answer.
- B TRUE and C FALSE
- B FALSE and C TRUE
- B TRUE and C TRUE
Explanation
AND requires both operands to be TRUE, so a FALSE A forces the whole expression to FALSE regardless of B and C. No combination of B and C can rescue the result.
Question 10Computer Science content domain (as enumerated in the official 194 framework)
What is the time complexity of binary search on a sorted array of n elements?
- O(n)
- O(1)
- O(n log n)
- O(log n) Correct answer.
Explanation
Binary search halves the remaining search interval on each comparison, so the number of steps grows with the logarithm of n. Linear scan would be O(n), and sorting beforehand would cost O(n log n).
Question 11Computer Science content domain (as enumerated in the official 194 framework)
A recursive function lacks a proper base case. What is the most likely consequence at run time?
- The function returns a default value of zero
- The recursion automatically converts into an iterative loop
- The call stack grows until a stack overflow occurs Correct answer.
- The compiler rejects the program before execution
Explanation
Each recursive call consumes stack space for its frame; without a base case the calls never stop and the stack is exhausted. Compilers generally do not detect missing base cases, and recursion is not automatically rewritten as iteration.
Question 12Computer Science content domain (as enumerated in the official 194 framework)
Which SQL clause is used to filter rows produced by grouping before the grouped results are returned?
- WHERE
- ORDER BY
- GROUP BY
- HAVING Correct answer.
Explanation
HAVING applies conditions to groups after aggregation, whereas WHERE filters individual rows before grouping. ORDER BY sorts results and GROUP BY forms the groups themselves.
Question 13Computer Science content domain (as enumerated in the official 194 framework)
Which statement accurately distinguishes the Internet from the World Wide Web?
- The Internet is the global network of interconnected networks, while the Web is a service that runs on it Correct answer.
- The World Wide Web is the physical infrastructure, while the Internet is the software layer
- The Internet refers only to local area networks, while the Web spans wide areas
- The Internet and the World Wide Web are two names for the same system
Explanation
The Internet is the underlying packet-switched network of networks; the Web is one application-layer service (HTTP and hyperlinked documents) delivered over it. Other services such as email and file transfer also use the Internet.
Question 14Computer Science content domain (as enumerated in the official 194 framework)
In object-oriented programming, which concept allows a subclass to provide its own implementation of a method defined in its superclass?
- Encapsulation
- Instantiation
- Overloading
- Overriding Correct answer.
Explanation
Overriding replaces an inherited method with a subclass-specific implementation selected at run time. Overloading defines multiple methods with the same name but different parameters, encapsulation hides state, and instantiation creates objects.
Question 15Computer Science content domain (as enumerated in the official 194 framework)
A color image uses 8 bits each for red, green, and blue channels. How many bits are required to store one uncompressed pixel?
- 24 bits Correct answer.
- 32 bits
- 16 bits
- 8 bits
Explanation
Three channels at 8 bits each total 8 + 8 + 8 = 24 bits per pixel. This yields 2^24, or about 16.7 million, possible colors.
Question 16Computer Science content domain (as enumerated in the official 194 framework)
Which statement best explains why hexadecimal notation is commonly used when working with computer memory?
- Hexadecimal is the only notation a CPU can execute directly
- Hexadecimal digits represent decimal fractions more precisely than binary
- Hexadecimal eliminates the need for error checking in memory addresses
- Each hexadecimal digit maps exactly to four binary bits, making byte values compact and readable Correct answer.
Explanation
Because 16 = 2^4, one hex digit corresponds to exactly four bits, so a byte is written as two hex digits. This makes binary values shorter and less error-prone to read without changing what the machine executes.
Question 17Computer Science content domain (as enumerated in the official 194 framework)
In the TCP/IP model, at which layer does a router primarily operate when forwarding packets between networks?
- Internet layer Correct answer.
- Transport layer
- Network access layer
- Application layer
Explanation
Routers forward packets based on IP addresses, which are handled at the Internet layer (the network layer in the OSI model). Transport-layer ports and application protocols are not examined for forwarding decisions.
Question 18Computer Science content domain (as enumerated in the official 194 framework)
A linear search and a binary search are both applied to the same sorted array of 1,000 elements. Which statement about their worst-case performance is correct?
- Both require the same number of comparisons in the worst case
- Binary search needs far fewer comparisons because it discards half the remaining elements each step Correct answer.
- Binary search requires more comparisons because it must compute midpoints
- Linear search is faster because it does not require the array to be sorted
Explanation
Binary search halves the search space each comparison, needing about log2(1000), roughly 10, comparisons in the worst case. Linear search may examine all 1,000 elements.
Question 19Computer Science content domain (as enumerated in the official 194 framework)
Which of the following best describes the role of an operating system's scheduler?
- Deciding which ready process receives CPU time and for how long Correct answer.
- Translating source code into machine instructions
- Storing files in a hierarchical directory structure
- Mapping virtual addresses to physical memory frames
Explanation
The scheduler selects among ready processes and allocates CPU time according to a scheduling policy. Compilation, address translation, and file organization are handled by other components.
Question 20Computer Science content domain (as enumerated in the official 194 framework)
Which practice most directly reduces the risk of a SQL injection attack in a web application?
- Using parameterized queries with bound parameters Correct answer.
- Displaying detailed database error messages to users
- Relying on client-side JavaScript validation of input
- Storing passwords using a fast hash without a salt
Explanation
Parameterized queries keep user input separate from SQL syntax, so input cannot alter the statement's structure. Escaping alone is fragile, and client-side validation can be bypassed entirely.
Question 21Computer Science content domain (as enumerated in the official 194 framework)
A program computes the sum of the first n integers using the loop sum = sum + i for i from 1 to n. Which loop invariant holds before each iteration?
- sum equals n multiplied by i
- sum equals the value of i squared
- sum equals the total of all integers from 1 through i - 1 Correct answer.
- sum equals the total of all integers from 1 through i
Explanation
Before the body executes with counter value i, the accumulator already contains the sum of values 1 through i - 1. Adding i during the iteration then re-establishes the invariant for the next value.
Question 22Computer Science content domain (as enumerated in the official 194 framework)
Which statement about the relationship between Big-O and Big-Theta notation is correct?
- Big-O gives an asymptotic upper bound, while Big-Theta gives a tight bound in both directions Correct answer.
- Big-O and Big-Theta always describe the same set of functions
- Big-O gives a lower bound, while Big-Theta gives an upper bound
- Big-Theta applies only to constant-time algorithms
Explanation
Big-O bounds a function from above asymptotically, whereas Big-Theta requires matching upper and lower bounds, meaning the function grows at the same rate. A function can be O(n^2) without being Theta(n^2).
Question 23Computer Science content domain (as enumerated in the official 194 framework)
A hash table uses chaining for collision resolution and its load factor grows well beyond one. What is the most direct effect on performance?
- Memory usage decreases because fewer buckets are needed
- Search time improves because more keys share each bucket
- Average search time degrades toward linear because chains become longer Correct answer.
- Hash collisions are eliminated once the load factor exceeds one
Explanation
With chaining, each bucket holds a list, and as the load factor rises the average chain length grows, so lookups approach O(n). Resizing or rehashing is the usual remedy.
Question 24Computer Science content domain (as enumerated in the official 194 framework)
In a relational database, a transaction is said to satisfy the atomicity property when which condition holds?
- Its intermediate states are invisible to other concurrent transactions
- All of its operations commit together or none of them take effect Correct answer.
- Committed data survives a subsequent system failure
- It transforms one valid database state into another valid state
Explanation
Atomicity treats a transaction as an indivisible unit: either every operation is applied or the database rolls back entirely. Isolation concerns visibility, durability concerns survival after failure, and consistency concerns valid state transitions.
Question 25Computer Science content domain (as enumerated in the official 194 framework)
A processor uses a five-stage pipeline. Which situation most directly causes a control hazard that may require flushing the pipeline?
- An arithmetic instruction that depends on the immediately preceding result
- Two instructions that both write to the same register in the same cycle
- A conditional branch whose outcome is not yet resolved when the next instruction is fetched Correct answer.
- A cache miss on a data load in the memory stage
Explanation
Control hazards arise when the fetch stage does not yet know which instruction to fetch next, as with an unresolved branch, so speculative instructions may need flushing. Data dependencies and cache misses cause data and structural stalls instead.
Question 26Computer Science content domain (as enumerated in the official 194 framework)
In a computer science context, which statement best describes the purpose of a compiler?
- It links together previously compiled object files into a single executable without analyzing source code.
- It converts assembly language mnemonics into binary machine instructions on a one-to-one basis.
- It translates a high-level source program into machine code or an intermediate form before execution. Correct answer.
- It executes a program one statement at a time while preserving the source text for debugging.
Explanation
A compiler performs whole-program translation from a high-level language into a lower-level target such as machine code or bytecode, reporting errors before run time. It differs from an interpreter, which executes source directly, and from a linker or assembler, which handle later or narrower stages.
Question 27Computer Science content domain (as enumerated in the official 194 framework)
A programmer wants to store a collection of student records and repeatedly search for a record by a unique student ID. Which data structure most directly supports average-case constant-time lookup by that ID?
- A binary max-heap ordered by student ID
- A singly linked list ordered by insertion time
- A stack of records pushed in arrival order
- A hash table keyed by student ID Correct answer.
Explanation
A hash table maps each key to a bucket through a hash function, giving average-case O(1) lookup when the load factor is controlled. The other structures require linear scans or support only restricted access patterns.
Question 28Computer Science content domain (as enumerated in the official 194 framework)
Which of the following is the decimal value of the unsigned binary number 101101?
- 54
- 43
- 45 Correct answer.
- 61
Explanation
Evaluating place values from left to right gives 32 + 0 + 8 + 4 + 0 + 1 = 45. Each bit contributes 2 raised to its position index counting from zero on the right.
Question 29Computer Science content domain (as enumerated in the official 194 framework)
Which logic gate produces a TRUE output only when its two inputs differ?
- OR
- NOR
- XOR Correct answer.
- AND
Explanation
The exclusive-OR gate outputs 1 when exactly one input is 1, which is the condition that the inputs differ. AND requires both inputs true, OR requires at least one, and NOR outputs true only when both are false.
Question 30Computer Science content domain (as enumerated in the official 194 framework)
Which statement correctly describes the difference between the `while` loop and the `do-while` loop in languages such as C, C++, and Java?
- A `while` loop tests its condition before each iteration, whereas a `do-while` loop tests after the body executes. Correct answer.
- A `while` loop requires a counter variable, whereas a `do-while` loop does not.
- A `while` loop always executes its body at least once, whereas a `do-while` loop may execute zero times.
- A `do-while` loop cannot contain a `break` statement, whereas a `while` loop can.
Explanation
The `while` loop is a pretest loop, so a false condition at entry skips the body entirely. The `do-while` loop is a posttest loop, so its body runs once before the condition is checked.
Question 31Computer Science content domain (as enumerated in the official 194 framework)
A student types the URL of a website into a browser. Which protocol is primarily responsible for translating the human-readable domain name into an IP address?
- DHCP
- HTTP
- FTP
- DNS Correct answer.
Explanation
The Domain Name System resolves domain names to IP addresses through a hierarchy of name servers. HTTP transfers web content, DHCP assigns host configuration, and FTP transfers files.
Question 32Computer Science content domain (as enumerated in the official 194 framework)
Which statement best describes the role of a primary key in a relational database table?
- It may contain duplicate values as long as no two rows are entirely identical.
- It uniquely identifies each row and cannot contain NULL values. Correct answer.
- It must reference a key in another table to enforce referential integrity.
- It stores the result of an aggregate function computed over each group.
Explanation
A primary key enforces entity integrity by requiring uniqueness and non-null values for every row. A foreign key, by contrast, references a key in another table to enforce referential integrity.
Question 33Computer Science content domain (as enumerated in the official 194 framework)
In a spreadsheet or database context, which statement best explains why floating-point arithmetic can produce a result such as 0.1 + 0.2 = 0.30000000000000004?
- The result is caused by an integer overflow in the mantissa field.
- The values were entered as text strings, so the software concatenated them instead of adding.
- The processor performs addition in base 16, which rounds all fractional results upward.
- The values are stored in binary floating-point format, which cannot represent most decimal fractions exactly. Correct answer.
Explanation
IEEE 754 binary floating-point represents numbers as sums of negative powers of two, so fractions such as 0.1 and 0.2 have infinitely repeating binary expansions and must be rounded. The small error becomes visible when the rounded values are added.
Question 34Computer Science content domain (as enumerated in the official 194 framework)
A function is defined recursively as f(0) = 1 and f(n) = n * f(n - 1) for n > 0. What value does f(4) return?
- 16
- 10
- 12
- 24 Correct answer.
Explanation
Expanding the recurrence gives f(4) = 4 × 3 × 2 × 1 × f(0) = 24. This is the factorial function, and its recursive definition multiplies each integer down to the base case.
Question 35Computer Science content domain (as enumerated in the official 194 framework)
A binary search tree contains integer keys inserted in this order: 50, 30, 70, 20, 40, 60, 80. Which traversal lists the keys in ascending order?
- Postorder traversal
- Preorder traversal
- Level-order traversal
- Inorder traversal Correct answer.
Explanation
An inorder traversal visits the left subtree, then the node, then the right subtree, which for a binary search tree yields keys in sorted order. Preorder and postorder place the root before or after its subtrees and do not produce sorted output.
Question 36Computer Science content domain (as enumerated in the official 194 framework)
A programmer writes the Boolean expression (A OR B) AND (NOT A OR C). Which single assignment of A, B, and C makes the expression TRUE?
- A = 1, B = 0, C = 0
- A = 0, B = 0, C = 0
- A = 0, B = 1, C = 1 Correct answer.
- A = 1, B = 1, C = 0
Explanation
With A = 0, B = 1, and C = 1, the first clause (A OR B) is true and the second clause (NOT A OR C) is true, so the conjunction is true. The other assignments make at least one clause false.
Question 37Computer Science content domain (as enumerated in the official 194 framework)
A program contains the loop `for i from 1 to n: for j from 1 to n: count = count + 1`. Which function best describes the number of times `count` is incremented?
- n log n
- 2 raised to the n
- n
- n squared Correct answer.
Explanation
The outer loop runs n times and, for each outer iteration, the inner loop runs n times, producing n × n = n² increments. This quadratic growth is typical of nested loops over the same range.
Question 38Computer Science content domain (as enumerated in the official 194 framework)
Which statement best explains why a relational database designer would normalize a table into third normal form?
- To encrypt sensitive columns and enforce access control.
- To replace primary keys with surrogate keys for faster joins.
- To increase the number of columns so that fewer tables are needed.
- To reduce redundant data and eliminate transitive dependencies that can cause update anomalies. Correct answer.
Explanation
Third normal form removes transitive dependencies so that non-key attributes depend only on candidate keys, which reduces redundancy and the update, insert, and delete anomalies it causes. Normalization typically increases the number of tables rather than reducing it.
Question 39Computer Science content domain (as enumerated in the official 194 framework)
A web application builds a SQL query by concatenating user input directly into the statement. Which change most directly prevents an attacker from altering the query structure?
- Storing the database credentials in an environment variable.
- Escaping all single quotation marks in the input before concatenation.
- Limiting the length of the input field to 20 characters.
- Using parameterized queries with bound parameters. Correct answer.
Explanation
Parameterized queries send the query structure and the data separately, so user input is treated as a value and cannot change the parsed statement. Escaping and length limits reduce risk but do not eliminate the injection channel as reliably.
Question 40Computer Science content domain (as enumerated in the official 194 framework)
Which statement correctly distinguishes a process from a thread in a modern operating system?
- Threads within a process share the same address space, whereas separate processes have independent address spaces. Correct answer.
- A process cannot contain more than one thread of execution.
- A process shares its heap with other processes, while threads have private heaps.
- Threads always require more memory overhead than processes because each thread has its own page table.
Explanation
A process owns an address space containing its code, data, and heap, and threads are execution units within that process that share those resources. Separate processes are isolated by their own address spaces and require interprocess communication to share data.
Question 41Computer Science content domain (as enumerated in the official 194 framework)
A student writes the expression `2 + 3 * 4` in a language that follows standard operator precedence. What value is produced?
- 20
- 14 Correct answer.
- 24
- 9
Explanation
Multiplication has higher precedence than addition, so 3 * 4 is evaluated first to give 12, and then 2 + 12 = 14. Parentheses would be needed to force the addition to occur first.
Question 42Computer Science content domain (as enumerated in the official 194 framework)
A programmer declares an array of 10 integers and then attempts to write to index 10 in a language that performs no bounds checking. What is the most likely consequence?
- The write is silently discarded and the program continues normally.
- The language raises a compile-time error because the index is out of range.
- The array automatically expands to 11 elements to accommodate the write.
- The write succeeds and may corrupt adjacent memory, producing unpredictable behavior. Correct answer.
Explanation
Without bounds checking, index 10 refers to memory just past the array's allocated region, so the write can overwrite another variable or control data. Such out-of-bounds writes are a common source of memory-corruption vulnerabilities.
Question 43Computer Science content domain (as enumerated in the official 194 framework)
A network administrator assigns a subnet mask of 255.255.255.192 to a network. How many usable host addresses does each subnet provide?
- 126
- 30
- 64
- 62 Correct answer.
Explanation
The mask 255.255.255.192 has 26 network bits, leaving 6 host bits, so each subnet contains 2^6 = 64 addresses. Subtracting the network and broadcast addresses leaves 62 usable host addresses.
Question 44Computer Science content domain (as enumerated in the official 194 framework)
A programmer needs to store a true/false flag for each of 64 independent settings in as little memory as possible. Which representation is most appropriate?
- An array of 64 floating-point values
- A single 64-bit integer used as a bitmask Correct answer.
- A string of 64 characters, each either 'T' or 'F'
- An array of 64 Boolean variables, each stored as a separate byte
Explanation
A 64-bit integer can hold 64 flags, one per bit, so the entire set fits in 8 bytes and individual flags can be tested or set with bitwise operations. The other representations use at least one byte per flag.
Question 45Computer Science content domain (as enumerated in the official 194 framework)
Which statement best describes the difference between the `==` operator and the `equals` method when comparing objects in Java?
- `==` compares object references, whereas `equals` can be overridden to compare object contents. Correct answer.
- `==` can be used only with primitive types, whereas `equals` can be used only with objects.
- `==` and `equals` always produce identical results for objects of the same class.
- `==` compares object contents, whereas `equals` compares memory addresses.
Explanation
For reference types, `==` tests whether two variables refer to the same object, while `equals` is a method that classes such as String override to compare logical content. Using `==` to compare strings can therefore give unexpected results.
Question 46Computer Science content domain (as enumerated in the official 194 framework)
A programmer writes a recursive function that computes Fibonacci numbers as fib(n) = fib(n-1) + fib(n-2) without memoization. Which statement best characterizes its running time?
- It runs in quadratic time because two recursive calls are made per level.
- It runs in logarithmic time because the input is halved at each call.
- It runs in linear time because each call performs constant work.
- It runs in exponential time because overlapping subproblems are recomputed many times. Correct answer.
Explanation
The naive recursion forms a call tree in which the same subproblems are solved repeatedly, so the number of calls grows exponentially with n. Memoization or dynamic programming reduces the work to linear time.
Question 47Computer Science content domain (as enumerated in the official 194 framework)
A sorted array contains 1,000,000 integers. An algorithm repeatedly halves the search interval until the target is found or the interval is empty. Approximately how many comparisons are needed in the worst case?
- 500,000
- 20 Correct answer.
- 1,000,000
- 1,000
Explanation
Halving the interval each step gives a worst-case count of about log2(1,000,000), which is approximately 20 because 2^20 is about one million. This logarithmic behavior is what makes binary search efficient on large sorted arrays.
Question 48Computer Science content domain (as enumerated in the official 194 framework)
A processor executes an instruction that loads a value from memory. Which sequence correctly describes the stages of the fetch-decode-execute cycle for that instruction?
- Fetch the instruction, execute it immediately, and decode it only if an error occurs.
- Write the result to memory, fetch the instruction, decode it, and then execute it.
- Decode the instruction, fetch it from memory, execute it, and then compute its address.
- Fetch the instruction, decode the opcode and operands, compute the effective address, access memory, and write back the result. Correct answer.
Explanation
The cycle begins by fetching the instruction pointed to by the program counter, then decoding it to determine the operation and operand addressing. For a load, the effective address is computed, memory is accessed, and the value is written to a register.
Question 49Computer Science content domain (as enumerated in the official 194 framework)
A hash table uses open addressing with linear probing. As the load factor approaches 1, which problem becomes most severe?
- Keys that were never inserted begin to appear in the table.
- The table automatically converts to a linked list for each bucket.
- Primary clustering causes long probe sequences and degrades search performance. Correct answer.
- The hash function begins to produce negative indices.
Explanation
Linear probing places colliding keys in the next available slot, so occupied runs grow and merge, a phenomenon called primary clustering. As the table fills, probe lengths increase sharply and operations approach linear time.
Question 50Computer Science content domain (as enumerated in the official 194 framework)
A relational schema has a relation R(A, B, C) with functional dependencies A → B and B → C. Which statement about R is correct?
- R is in Boyce-Codd normal form because A is a candidate key.
- R is in third normal form because every attribute depends on the primary key.
- R is in first normal form only because it contains a composite key.
- R is in second normal form but not in third normal form because of the transitive dependency A → C. Correct answer.
Explanation
The dependency A → B and B → C implies A → C, a transitive dependency of a non-key attribute on the key through another non-key attribute. This violates third normal form while still satisfying second normal form for the given key A.