← CChallenge.com

Coding · Facts & stats

C facts & stats

7 fact-checked facts about the C programming language, each with the reason behind it. 5 more are in today's round and join this page after it closes.

Play today's round

The basics

Which character ends most statements in C?

AnswerSemicolon (;)

C uses the semicolon as a statement terminator, so forgetting one is a classic compile error.

In C, what is the index of the first element of an array?

Answer0

C arrays are zero-indexed, so an array of 10 elements uses indexes 0 through 9.

Going deeper

What does a pointer variable in C store?

AnswerA memory address

A pointer holds the location of another value, which you reach by dereferencing it.

Which C operator gives the memory address of a variable?

Answer&

Writing &x yields the address of x, which can then be stored in a pointer.

Which format specifier prints a value of type int in decimal in C?

Answer%d

%d prints a signed decimal integer, while %s is for strings, %f for floating-point and %c for characters.

Expert level

C was developed as a successor to which earlier language?

AnswerB

C grew out of a simpler, typeless language used on early Unix systems, adding data types and more.

Which pair of standard library functions allocates and releases heap memory in C?

Answermalloc and free

One requests a block of memory at runtime and the other returns it; forgetting to release memory causes leaks.

Know these cold?Today's round is five questions like these, 20 seconds each. Your streak and level follow you to every arena.Play today's round