Certified Computer Scientist (CCS) Exam Prep
Free practice questions

Free CCS Practice Questions

10 exam-style questions with answers and explanations, straight from our 1,030-question bank. Tap an answer to check yourself. When you're ready, take the scored version in the free practice test.

Start the free practice test → ★★★★★4.9/5 from 2,400+ candidates · No signup

These 10 free CCS questions are organized by exam domain, so you can see how each part of the Certified Computer Scientist (CCS) blueprint is tested. Reveal the answer and explanation under each question.

Domain 1: Algorithms and Complexity

Question 1

An in-memory event index contains n records with distinct timestamp keys. Inserts and deletions must take O(log n) worst-case time, and a query must return the k records within a timestamp interval in sorted order in O(log n + k) time. Select the single data structure that supports both requirements.

Show answer & explanation

Correct answer: B - A red-black search tree, with an ordered range traversal.

Domain 2: Computational Science

Question 2

A numerical routine evaluates f(x) = sqrt(x*x + 1) - x for large positive x. Near x = 100000000, its IEEE 754 binary64 result loses almost all relative accuracy because it subtracts nearly equal rounded quantities. Overflow and underflow do not occur. Each displayed operation is evaluated in binary64 without algebraic reassociation. The mathematically equivalent evaluation that avoids this cancellation is:

Show answer & explanation

Correct answer: C - 1 / (sqrt(x*x + 1) + x)

Domain 3: Discrete Structures

Question 3

In an evaluated population of software packages, 1% are malicious. A scanner flags 90% of malicious packages and 5% of benign packages. A package selected at random from this population is flagged. A stated review policy permits automatic rejection only when the probability of maliciousness, given the available evidence, is at least 80%. With the flag as the only evidence, which assessment follows?

Show answer & explanation

Correct answer: A - About 15.4%; the flag alone does not meet the automatic-rejection requirement.

Domain 5: Human-Computer Interaction

Question 4

A web-based playlist editor allows tracks to be reordered by dragging. Keyboard focus reaches every drag handle, and its position is clearly visible, but a keyboard-only user cannot move any track. Only the final order matters, not the path of the drag. Which revision makes the reordering task keyboard-operable while retaining pointer interaction?

Show answer & explanation

Correct answer: D - Add keyboard-operable Move Up and Move Down controls for each track.

Domain 6: Information Assurance and Security

Question 5

A customer authenticated with multifactor authentication can retrieve another customer's statement by supplying that statement's valid identifier. The server checks the customer's role, uses a parameterized query, and serves the response over TLS. The interface displays only the customer's own statement links. Which change closes the demonstrated security gap?

Show answer & explanation

Correct answer: A - Authorize the requesting customer for the specific statement on the server.

Domain 7: Information Management

Question 6

In PostgreSQL 18, Device(id PRIMARY KEY) lists devices, and Job(device_id REFERENCES Device(id)) lists jobs. An unassigned job has a NULL device_id. A report must return exactly the devices with no assigned jobs, including when Job is empty. The current query uses: SELECT d.id FROM Device d WHERE d.id NOT IN (SELECT j.device_id FROM Job j); For every permitted table state, the WHERE condition can be repaired with:

Show answer & explanation

Correct answer: D - NOT EXISTS (SELECT 1 FROM Job j WHERE j.device_id = d.id)

Domain 9: Operating Systems

Question 7

A transfer requires two locks, A and B, before it can change shared data. A trace repeats this sequence: T1 acquires A; T2 acquires B. Each tries the other lock without blocking and fails. Each releases its held lock and immediately starts again. Both threads keep receiving CPU time, but neither transfer completes. What is the most specific diagnosis of the observed execution?

Show answer & explanation

Correct answer: B - Livelock: both threads keep retrying without completing a transfer.

Domain 10: Parallel and Distributed Computing

Question 8

A queue redelivers any event whose acknowledgment is lost. Each event has a stable ID and requires one debit in a relational database. The processed-event table enforces a unique constraint on that ID. A worker can crash between any two steps, including after a commit but before acknowledgment. The debit and event record can share one ACID transaction; event records remain stored while redelivery is possible. Processing eventually succeeds after recovery. The design that prevents both duplicate debits and skipped debits is:

Show answer & explanation

Correct answer: C - Commit the ID and debit together; acknowledge after success or confirmation of that already-committed ID.

Domain 11: Programming Languages

Question 9

A Python 3 program creates a callback and invokes it after the creating function has returned: def configure(): label = "draft" def show(): return label label = "ready" return show callback = configure() label = "outer" print(callback()) What is printed?

Show answer & explanation

Correct answer: A - ready

Domain 13: Software Engineering

Question 10

A coverage report shows 100% statement coverage after the single test member = true, subtotal = 120 for this pseudocode: function delivery_fee(member, subtotal): fee = 6 if member: fee = 4 if subtotal >= 100: fee = 0 return fee Count the true and false outcomes of each if as separate branches. The one additional test that brings branch coverage to 100% is:

Show answer & explanation

Correct answer: B - member = false, subtotal = 80

The rest of the CCS blueprint

The CCS exam also covers these domains. Drill them in the full free practice test:

That's 10 of 1,030

The full bank has 1,020 more CCS questions with explanations.

Continue in the free practice test →

View plans