Major Field Test Computer Science Study Guide

Unofficial: 66 questions, as many as the real test has, spread as ETS’s outline spreads them.

Set A has 5 elements and set B has 3. How many functions are there from A to B?
More options

Unofficial practice questions, not affiliated with ETS. Checked November 30, 2026.

What is on the MFT in Computer Science

Discrete structures, 15–21%
Functions, relations and sets; logic; proof; counting and number theory; graphs and trees; discrete probability.
Programming, 21–27%
Fundamental constructs, algorithms and data structures; recursion; event-driven and object-oriented programming; features, paradigms and implementation of langu
Algorithms, 16–22%
Advanced data structures; graph algorithms; strategies; distributed algorithms; computability and complexity; automata and formal languages.
Systems, 16–24%
Architecture: digital logic, data in the machine, assembly, interfacing. Operating systems: concurrency, scheduling, memory. Networking.
Software engineering, 3–9%
Requirements, specifications, design, validation and management.
Information management, 3–8%
Database systems and data modeling.

Checked November 30, 2026 against ETS, Major Field Test in Computer Science test description (2015). Rules change, so confirm with the agency itself before your test.

ETS test description (PDF)

All 66 questions with answers

Source: ets.org.

I. Discrete structures

  • 40% of messages are spam. A word is in 50% of spam and in 10% of the rest. A message has the word. What is the probability that it is spam? Answer: 10/13. Wikipedia, "Bayes' theorem". ETS test outline: I. Discrete structures
  • A forest has 50 vertices and 4 trees. How many edges does it have? Answer: 46. Wikipedia, "Tree (graph theory)". ETS test outline: I. Discrete structures
  • How many bit strings of length 10 have exactly two 0s? Answer: 45. Wikipedia, "Binomial coefficient". ETS test outline: I. Discrete structures
  • Of 40 students, 25 take databases, 18 take networks and 7 take neither. How many take both? Answer: 10. Wikipedia, "Inclusion–exclusion principle". ETS test outline: I. Discrete structures
Show all 66 questions

I. Discrete structures, continued

  • On the positive integers, "a divides b" is which kind of relation? Answer: A partial order. Wikipedia, "Partially ordered set". ETS test outline: I. Discrete structures
  • P(1) is true, and for every k ≥ 1, P(k) implies P(k + 2). For which n does this prove P(n)? Answer: Every odd n ≥ 1. Wikipedia, "Mathematical induction". ETS test outline: I. Discrete structures
  • Set A has 5 elements and set B has 3. How many functions are there from A to B? Answer: 243. Wikipedia, "Function (mathematics)". ETS test outline: I. Discrete structures
  • Three keys are each sent to one of 10 slots, every slot equally likely. What is the probability that no two share a slot? Answer: 0.72. Wikipedia, "Birthday problem". ETS test outline: I. Discrete structures
  • What is the contrapositive of "If the input is sorted, the loop runs once"? Answer: If the loop does not run once, the input is not sorted. Wikipedia, "Contraposition". ETS test outline: I. Discrete structures
  • What is the greatest common divisor of 252 and 198? Answer: 18. Wikipedia, "Euclidean algorithm". ETS test outline: I. Discrete structures
  • What is the negation of "Every user can read some file"? Answer: Some user can read no file. Wikipedia, "Quantifier (logic)". ETS test outline: I. Discrete structures
  • Which formula is true for every choice of truth values? Answer: (p → q) ↔ (¬p ∨ q). Wikipedia, "Material conditional". ETS test outline: I. Discrete structures

II. Programming

  • A queue lies in a circular array of 8 slots, 0 to 7. Its front is slot 6 and it holds 5 values. Where does the next value go? Answer: Slot 3. Wikipedia, "Circular buffer". ETS test outline: II. Programming
  • Array A has slots 0 to n − 1. With short-circuit evaluation, why is ( i < n and A[i] == k ) safe where ( A[i] == k and i < n ) is not? Answer: The test of i comes first and stops A[i] from being read out of range. Wikipedia, "Short-circuit evaluation". ETS test outline: II. Programming
  • Binary search is run on a sorted array of 5,000 elements. In the worst case how many elements does it inspect? Answer: 13. Wikipedia, "Binary search". ETS test outline: II. Programming
  • Classes Dog and Cat override speak() of class Animal. Animal a ← new Dog(); a.speak(). With dynamic dispatch, which speak() runs? Answer: Dog’s. Wikipedia, "Dynamic dispatch". ETS test outline: II. Programming
  • fib(n) returns n if n < 2, and fib(n − 1) + fib(n − 2) if not. Counting fib(5) itself, how many calls does fib(5) make? Answer: 15. Wikipedia, "Recursion (computer science)". ETS test outline: II. Programming
  • Global x is 10. Procedure f prints x. Procedure g has its own x of 20 and calls f. What is printed under static scope, and under dynamic scope? Answer: 10, then 20. Wikipedia, "Scope (computer science)". ETS test outline: II. Programming
  • In a compiler, which phase turns characters into tokens? Answer: Lexical analysis. Wikipedia, "Lexical analysis". ETS test outline: II. Programming
  • In an event-driven program, what mainly decides the order in which its handlers run? Answer: The order in which events occur. Wikipedia, "Event-driven programming". ETS test outline: II. Programming
  • n ← 100; c ← 0; while ( n > 0 ) n ← n / 3; c ← c + 1 end while. Division drops any remainder. What is c at the end? Answer: 5. Wikipedia, "While loop". ETS test outline: II. Programming
  • Node b goes into a linked list just after node p. Which two steps, in this order, do it? Answer: b.next ← p.next, then p.next ← b. Wikipedia, "Linked list". ETS test outline: II. Programming
  • On an empty stack: push 1, push 2, pop, push 3, push 4, pop, pop. In which order do values come off? Answer: 2, 4, 3. Wikipedia, "Stack (abstract data type)". ETS test outline: II. Programming
  • Procedure p( int a, pass-by-reference int b ) does a ← a + 1; b ← b + 5. With x ← 1, p( x, x ) is called. What is x after it? Answer: 6. Wikipedia, "Evaluation strategy". ETS test outline: II. Programming
  • Two objects point to each other and nothing else points to either. Which collector leaves them in memory? Answer: Plain reference counting. Wikipedia, "Reference counting". ETS test outline: II. Programming
  • Which function is pure in the sense of functional programming? Answer: One that returns the larger of its two arguments. Wikipedia, "Pure function". ETS test outline: II. Programming
  • x ← 3; y ← 5; x ← x + y; y ← x − y; x ← x − y. What are x and y now? Answer: x is 5 and y is 3. Wikipedia, "Assignment (computer science)". ETS test outline: II. Programming

III. Algorithms and complexity

  • 50, 30, 70, 20, 40 and 60 go, in that order, into an empty binary search tree. What is its preorder traversal? Answer: 50, 30, 20, 40, 70, 60. Wikipedia, "Tree traversal". ETS test outline: III. Algorithms and complexity
  • A binary heap is stored in an array that starts at index 0. Where are the children of the element at index 5? Answer: Indexes 11 and 12. Wikipedia, "Binary heap". ETS test outline: III. Algorithms and complexity
  • A graph has edges AB 1, BC 2, AC 3, CD 4 and BD 5. What is the weight of its minimum spanning tree? Answer: 7. Wikipedia, "Kruskal's algorithm". ETS test outline: III. Algorithms and complexity
  • A hash table has 7 slots, h(k) = k mod 7, and linear probing. Into the empty table go 10, then 3, then 17. Which slot holds 17? Answer: Slot 5. Wikipedia, "Linear probing". ETS test outline: III. Algorithms and complexity
  • A replicated store commits a write when a majority of its 7 replicas agree. What is the largest number that can fail while writes still commit? Answer: 3. Wikipedia, "Quorum (distributed computing)". ETS test outline: III. Algorithms and complexity
  • Coins are worth 1, 3 and 4. To pay 6, a greedy method takes the largest coin that fits each time. How many coins does it use, and what is the least? Answer: 3, and the least is 2. Wikipedia, "Greedy algorithm". ETS test outline: III. Algorithms and complexity
  • Quicksort always takes the first element as its pivot. Which input makes it take time proportional to n²? Answer: An array that is already sorted. Wikipedia, "Quicksort". ETS test outline: III. Algorithms and complexity
  • Someone finds a polynomial-time algorithm for one NP-complete problem. What follows? Answer: Every problem in NP has one. Wikipedia, "NP-completeness". ETS test outline: III. Algorithms and complexity
  • T(n) = 4T(n/2) + n. What is T(n)? Answer: Θ(n²). Wikipedia, "Master theorem (analysis of algorithms)". ETS test outline: III. Algorithms and complexity
  • Which description fits the language of strings aⁿbⁿ, with the same number of a’s and then b’s? Answer: Context-free and not regular. Wikipedia, "Regular language". ETS test outline: III. Algorithms and complexity
  • Which input can make Dijkstra’s algorithm give a wrong shortest path? Answer: A graph with an edge of negative weight. Wikipedia, "Dijkstra's algorithm". ETS test outline: III. Algorithms and complexity
  • Which task can no program do for every program and input? Answer: Decide whether the program halts. Wikipedia, "Halting problem". ETS test outline: III. Algorithms and complexity
  • Which two properties make a problem a good fit for dynamic programming? Answer: Optimal substructure and overlapping subproblems. Wikipedia, "Dynamic programming". ETS test outline: III. Algorithms and complexity

IV. Systems

  • A cache hit takes 1 cycle. 5% of accesses miss, and each miss adds 40 cycles. What is the average memory access time? Answer: 3 cycles. Wikipedia, "Average memory access time". ETS test outline: IV. Systems
  • A direct-mapped cache has 64 lines of 16 bytes. Addresses have 32 bits and name bytes. How many bits are in the tag? Answer: 22. Wikipedia, "CPU cache". ETS test outline: IV. Systems
  • A processor with a 4-stage pipeline, one cycle a stage, runs 50 instructions and never stalls. How many cycles pass? Answer: 53. Wikipedia, "Instruction pipelining". ETS test outline: IV. Systems
  • At time 0 three jobs are ready, in the order P1 (5 ms), P2 (3 ms), P3 (1 ms). Round robin has a 2 ms quantum and no switching cost. When does P2 finish? Answer: At 8 ms. Wikipedia, "Round-robin scheduling". ETS test outline: IV. Systems
  • Counter c is 0. Two threads each run c ← c + 1 once, with no lock. Which value can c have at the end, besides 2? Answer: 1. Wikipedia, "Race condition". ETS test outline: IV. Systems
  • Every thread must take locks in one fixed order. Which condition for deadlock does the rule break? Answer: Circular wait. Wikipedia, "Deadlock (computer science)". ETS test outline: IV. Systems
  • How many host addresses can be assigned in an IPv4 network with prefix /26? Answer: 62. Wikipedia, "Subnet". ETS test outline: IV. Systems
  • Memory has 3 empty page frames and least recently used replacement. Pages are used in the order 1, 2, 3, 1, 4, 2. How many page faults are there? Answer: 5. Wikipedia, "Page replacement algorithm". ETS test outline: IV. Systems
  • Virtual addresses have 32 bits and a page has 4,096 bytes. How many bits form the virtual page number? Answer: 20. Wikipedia, "Page table". ETS test outline: IV. Systems
  • What does direct memory access (DMA) save the processor from? Answer: Moving every word between a device and memory itself. Wikipedia, "Direct memory access". ETS test outline: IV. Systems
  • What does the Boolean expression (A AND B) OR (A AND NOT B) reduce to? Answer: A. Wikipedia, "Boolean algebra". ETS test outline: IV. Systems
  • What is −37 in 8-bit two’s complement? Answer: 11011011. Wikipedia, "Two's complement". ETS test outline: IV. Systems
  • Which service does TCP give an application that UDP does not? Answer: Delivery in order, with lost data sent again. Wikipedia, "Transmission Control Protocol". ETS test outline: IV. Systems
  • X holds 5. LOAD R1, X; ADD R1, R1; ADD R1, R1; STORE R1, Y, where ADD R1, R1 adds R1 to itself. What is in Y? Answer: 20. Wikipedia, "Assembly language". ETS test outline: IV. Systems

V. Software engineering

  • A field accepts whole numbers from 18 to 65. Which test values are the boundary values and their neighbors outside? Answer: 17, 18, 65, 66. Wikipedia, "Boundary-value analysis". ETS test outline: V. Software engineering
  • After a bug is fixed, tests that passed before are run again. What is this testing called? Answer: Regression testing. Wikipedia, "Regression testing". ETS test outline: V. Software engineering
  • Which goal do designers have for the modules of a system? Answer: High cohesion and low coupling. Wikipedia, "Cohesion (computer science)". ETS test outline: V. Software engineering
  • Which statement is a nonfunctional requirement? Answer: A search answers within one second. Wikipedia, "Non-functional requirement". ETS test outline: V. Software engineering

VI. Information management

  • A student can take many courses, and a course has many students. How does a relational database usually store this? Answer: In a third table whose rows pair a student with a course. Wikipedia, "Associative entity". ETS test outline: VI. Information management
  • A transfer takes money from one account, and the system fails before it is added to the other. The database undoes the first step. Which ACID property is this? Answer: Atomicity. Wikipedia, "ACID". ETS test outline: VI. Information management
  • In table (emp_id, dept_id, dept_name), emp_id is the key and dept_id determines dept_name. Which normal form does this break? Answer: Third normal form. Wikipedia, "Third normal form". ETS test outline: VI. Information management
  • Table customer has 10 rows. 6 customers have one order each and 4 have none. How many rows does customer LEFT JOIN orders give? Answer: 10. Wikipedia, "Join (SQL)". ETS test outline: VI. Information management

VII. Other

  • A site builds a database query by pasting what the user typed into its text. Which defense is best against SQL injection? Answer: Parameterized queries. Wikipedia, "SQL injection". ETS test outline: VII. Other
  • A* search on a graph is sure to find a cheapest path with which kind of heuristic? Answer: One that never overestimates the cost left. Wikipedia, "A* search algorithm". ETS test outline: VII. Other
  • By Fitts’s law, which change makes a button quicker to reach with a pointer? Answer: Making it larger and bringing it nearer. Wikipedia, "Fitts's law". ETS test outline: VII. Other
  • In 3D graphics, what does a z-buffer decide for each pixel? Answer: Which surface is nearest the viewer. Wikipedia, "Z-buffering". ETS test outline: VII. Other

How this list was compiled: Outline: the test description ETS publishes for the Major Field Test in Computer Science (ets.org, copyright 2015), read November 30, 2026: discrete structures 15 to 21%, programming 21 to 27%, algorithms and complexity 16 to 22%, systems 16 to 24%, software engineering 3 to 9%, information management 3 to 8%, other 3 to 8%. This bank holds 12, 15, 13, 14, 4, 4 and 4 of 66, inside each range. Each fact was read on November 30, 2026 in the Wikipedia article named under its question; answers that are arithmetic or the trace of a program were worked out a second time, most of them by a script. License: Questions, choices and explanations are original work of this site.

How it works

This Major Field Test computer science study guide gives ETS’s outline and 66 questions of our own on it. It is unofficial and not affiliated with, endorsed by or sponsored by ETS.

Read the full guide

Where to spend the time

Four courses make up about four fifths of the test: programming, systems, algorithms and discrete structures. Databases, software engineering and the mixed last area have a few questions each. Take the 66, then review the course with the lowest score.

How the pseudocode reads

ETS uses no real language. x ← 5 stores 5 in x, == compares, ≠ is “not equal”, a[i] is an element, pass-by-reference marks a parameter the procedure can change, and end while or end if closes a block. The questions here use the same signs.

Taking it like the real one

Exam mode asks all 66 in 120 minutes, about 1 minute 49 seconds each. The real questions come partly in sets on a diagram or a program; here each stands alone, with four choices.

  • Trace loops on paper, one row for each pass.
  • No calculator is needed on the real test. Learn the powers of 2 up to 2¹⁶.

Questions and answers

How many questions are on the MFT in Computer Science?

66 multiple-choice questions, some in sets based on diagrams, graphs and program fragments, by ETS’s test description.

How long is the Major Field Test in Computer Science?

It is designed for two hours and may be split into two sessions. A proctor gives it, and the program chooses when and where.

What programming language does the Major Field Test use?

None. The description says it uses simple pseudocode that any computer science student should follow, and prints three short examples of it.

What score do you need on the Major Field Test?

ETS’s description sets none. Each student gets a total score, and a department may compare it with the national figures ETS publishes each year.