C · Starter

The basics: what a thing is and what it's for.

Starter·7.1.1

Which function is used to allocate memory dynamically in C?

Starter·7.1.2

What is the typical size of an int on a 32-bit system?

Starter·7.1.3

What does the static keyword do to a local variable in C?

Starter·7.1.4

What is the difference between '==' and '=' in C?

Starter·7.1.5

What does the sizeof operator return?

Starter·7.1.6

What is the purpose of a #include directive in C?

Starter·7.1.7

Which printf format specifier is used to print an int in decimal?

Starter·7.1.8

How do you declare a pointer variable named p that points to an int?

Starter·7.1.9

What does the unary & operator do when applied to a variable, e.g. &x?

Starter·7.1.10

What character marks the end of a C string literal in memory?

Starter·7.1.11

What is the key structural difference between a for loop and a while loop in C?

Starter·7.1.12

What does the break statement do when executed inside a loop?

Starter·7.1.13

What does the continue statement do when executed inside a loop?

Starter·7.1.14

What is the scope of an ordinary (non-static) local variable declared inside a function?

Starter·7.1.15

What does the modulo operator % return for two integers, e.g. 7 % 3?

Starter·7.1.16

What is a function prototype (forward declaration) used for in C?

Starter·7.1.17

What does the ternary operator `cond ? a : b` evaluate to?

Starter·7.1.18

What return type does the entry-point function `main` have in standard C?

Starter·7.1.19

How do you write a single-line comment in C (C99 and later)?

Starter·7.1.20

How do you declare an array of 10 ints named arr in C?