Skip to content
Brainlag
  1. Reference
  2. Concepts
  3. C

Strings are char arrays

A C string is an array of chars that ends with a 0 byte. See why strlen and sizeof disagree, and why the array needs one extra box.

C9 minCode

Code

Inside: 2 short explanations, a runnable example and 1 checked exercise.

Already unlocked it? Sign in

Code editor. Press Control or Command plus Enter to run the code. Tab indents; to move focus out of the editor, press Escape and then Tab.