FirstHack Learn
Log in Sign up free

Mock tests

Timed papers with a real clock, instant scoring, and a breakdown afterwards showing which topics cost you the marks. Retake anything as often as you like.

51 papers · 640 questions · 30 free, 21 with Pro · no negative marking

You can sit any free paper without an account. Signing up is what saves the score, ranks you and pays coins.

Programming 10 papers

Output questions in C, C++, Python and Java — the ones interviewers ask.

C Programming — Predict the Output

Short C programs where you trace pointers, arrays, strings, scope and integer arithmetic to work out exactly what gets printed.

12 questions 15 min ◆ 25
Start the test

Python Basics — Predict the Output

Small Python snippets covering mutability, slicing, dictionaries, comprehensions and the gotchas that trip up beginners in interviews.

12 questions 15 min ◆ 25
Start the test

C — Operators, Precedence & Type Conversion

Predict the output of small C programs that hinge on integer arithmetic, type conversion, precedence and printf behaviour.

12 questions 15 min ◆ 25
Start the test
Pro

C — Pointers, Arrays & Strings

Trace pointer arithmetic, array decay and standard string functions in short C programs.

12 questions 15 min ◆ 25
See what is inside

C — Functions, Scope, Storage Classes & Recursion

Trace static variables, block scope, pass-by-value and recursive call patterns in C.

12 questions 15 min ◆ 25
Start the test
Pro

C++ — References, Overloading & STL Basics

Predict the output of C++ programs using references, default arguments, overloading, vector, map, set and sort.

12 questions 15 min ◆ 25
See what is inside

Python — Lists, Dicts, Sets, Tuples & Slicing

Predict the output of Python snippets built on slicing, aliasing, mutability and the built-in containers.

12 questions 15 min ◆ 25
Start the test
Pro

Python — Functions, Comprehensions & Closures

Predict the output of Python functions involving default arguments, *args/**kwargs, scope, closures and common gotchas.

12 questions 15 min ◆ 25
See what is inside

Java — Primitives, Strings, Arrays & Static

Predict the output of small Java programs covering primitive conversions, String identity, array defaults and static members.

12 questions 15 min ◆ 25
Start the test
Pro

Recursion & Iteration Tracing

Hand-trace recursive and iterative routines in C and Python and predict exactly what they print.

12 questions 18 min ◆ 25
See what is inside

How to use these

A drill is about a dozen questions on one topic — good for a spare fifteen minutes between classes. A full paper is forty questions in an hour and should be sat in one go, with the phone somewhere else.

There is no negative marking here, so never leave a question blank. A guess on a four-option question is worth a quarter of a mark on average; a blank is worth zero.

The score is the least useful part of the result. The topic breakdown underneath it is the part that tells you what to revise tonight.