C in 100 Seconds: strlen strcpy strcmp — Strings in C | Episode 11
0views
002:23
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
C doesn't have a string type. A string is just a char array with a null terminator at the end. Double quotes create one automatically — C adds
the backslash zero for you.
strlen counts characters before the terminator. strcpy copies one string into another buffer — you can't use equals. strcmp compares two
strings — zero means equal, negative means the first comes first alphabetically.
Student code: https://github.com/GoCelesteAI/c-in-100-seconds/tree/main/episode11
What You'll Learn:
• Strings are char arrays terminated by \0
• strlen — count characters before the null terminator
• strcpy — copy a string into another buffer
• strcmp — compare two strings (0 = equal)
• #include string.h for string functions
Next: Episode 12 — User Input
#c #programming #100seconds #learnc #strings #strlen #strcpy #strcmp #chararray #tutorial
Tags
c strings, char array c, strlen c, strcpy c, strcmp c, null terminator, string.h, c tutorial 2026, c beginner, 100 seconds, learn c, coding
tutorial
Tags
c stringschar array cstrlen cstrcpy cstrcmp cnull terminatorstring.hc tutorial 2026c beginner100 secondslearn ccoding tutorial