← 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

In a C program, which function is where execution begins?

Answermain()

Every hosted C program starts running in main, which returns an int status to the operating system.

Which function from stdio.h is commonly used to print formatted text in C?

Answerprintf

Its name is short for 'print formatted', and it writes text to standard output.

Going deeper

Where was the C language created in the early 1970s?

AnswerBell Labs

Dennis Ritchie developed C there, and it was soon used to rewrite the Unix operating system.

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.

In C, what marks the end of a string stored in a char array?

AnswerA null character '\0'

C strings have no stored length, so a terminating zero byte marks the end and a 5-letter word needs 6 bytes.

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