Lesson 16 of 50 · c
Strings – Character Arrays
Duration: 9 mins
C does not have a built‑in string type. Strings are arrays of char terminated by a null byte ('\0').
char name[6] = {'J','o','h','n','\0'}; // explicit
char greeting[] = "Hello"; // compiler adds '\0'
Standard library <string.h> offers functions like strlen, strcpy, strcat, strcmp. Always ensure destination buffers are large enough (use strncpy, strncat).