Color theme
0 day streak0 XPP1
CLearn mode
MISSION 1 OF 3

Correct a plant label

0 XP earned
C track: AdvancedMission: BeginnerCharacter arraysArray indexingCharacter literals
Before you start this advanced track

Arrays and functions, plus the basics of memory addresses, pointers, and byte sizes.

Guided code reading and debugging. Runnable coding challenges are available in JavaScript, Python, and SQL.

x
0 / 6 challenges
LEARN THE CONCEPT

Understand it, then try it.

A character array initialized from a string contains editable characters followed by a terminating zero byte. Array indexes begin at zero. Assigning a single-quoted character to one array element replaces just that character. The %s format prints the characters through the end of the string, stopping before its zero terminator.

mission.c
#include <stdio.h>int main(void) {  char label[] = "moss";  label[0] = 'M';  printf("%s\n", label);  return 0;}

Each example is a complete C11 console program. Compile as C, not C++. Arrays are local objects with the sizes shown; no input or external files are needed.

Track the values line by line. Predict the result before running this example in your own editor.