5questions
IntermediateNext.js
5 subjects
1 easy3 medium1 hard
How would you give the marketing pages and the signed-in dashboard different root layouts without changing any URLs?
Start practising6 easy13 medium8 hard
// 27 of 27 questions · 27 subjects
What compiler flags would you use for day-to-day development, and why not just run `gcc main.c`?
easyCompiler flagsToolchain
mediumDeclarationInitialisation
Why does `if (-1 < sizeof(int))` evaluate to false?
hardInteger promotionConversions
Does `volatile` make a variable safe to share between threads?
hardvolatileconst
Why does `if (flags & MASK == MASK)` not do what its author intended?
mediumPrecedenceBitwise
How do variadic functions like `printf` work, and why are they a common source of bugs?
mediumVariadicScope
What is wrong with returning a pointer to a local array, and why does it sometimes appear to work?
hardLifetimeStack vs heap
What is wrong with `p = realloc(p, new_size);`?
hardreallocLeaks
mediumArray decaysizeof
Why is `strncpy` not a safe replacement for `strcpy`, and what should you use instead?
mediumBuffer safetystrncpy
mediumStructsPadding
hardDynamic arraysRing buffers
How do you use `errno` correctly, and what is the most common mistake people make with it?
mediumerrnoExit codes
Why does `while (!feof(fp))` read the last line twice, and what is the correct loop?
easyStreamsBuffering
Why should you prefer `strtol` over `atoi`, and what goes wrong with a careless `qsort` comparator?
mediumqsortstrtol
Code that works at `-O0` breaks at `-O2`. What is the most likely explanation?
hardLinkingOptimisation
How do you unit-test C code that calls hardware or the operating system directly?
mediumUnit testingMocking
hardOpaque pointersCallbacks
Why must `pthread_cond_wait` always be called inside a `while` loop?
hardpthreadsCondition variables
5questions
Intermediate5 subjects
1 easy3 medium1 hard
How would you give the marketing pages and the signed-in dashboard different root layouts without changing any URLs?
Start practising26questions
Intermediate26 subjects
4 easy13 medium9 hard
Walk through what happens between typing a URL into the browser and your backend handler running.
Start practising29questions
Intermediate29 subjects
7 easy15 medium7 hard
How does an AI engineer's job differ from an ML engineer's?
Start practising