HomebaseWorks

C: practice, test and prove it

C basics: pointers, arrays, strings, operators, storage classes, structs, malloc/free and printf formats.

FreeNo sign-up to testNo attempts yet

C questions appear in many campus and fresher IT screenings, usually as short snippets where you predict the output. The topics repeat: pointer arithmetic, array and string handling, operator precedence, static variables, structs, and dynamic memory with malloc and free.

This page helps you practise tracing code exactly, which is the skill those tests reward. The lessons cover pointers and arrays in detail, then memory, storage classes and printf, including the mistakes that crash real programs.

Benchmark: The pass mark on this site is 80%, and C is commonly screened in fresher IT recruitment and for embedded and systems programming roles. Requirements vary by employer.

Lessons

Advertisement

Interview prep

Certificate

Free with an accountA PDF with your name, best score and date. Records this site's tests only.

Common questions

Which compiler should I use for practice?

Any standard compiler such as GCC or Clang works well. Compile with warnings turned on, for example gcc -Wall, because warnings catch many of the bugs these questions are built around.

Are undefined behaviour questions fair?

Some tests include snippets like i = i++ whose result the C standard does not define. The correct answer to those is that the behaviour is undefined, and the output questions here avoid them.

Do I need C if I plan to work in another language?

Many fresher screenings still use C because it shows how memory and data really work. That understanding carries over directly to Java, Python and C++ code.