Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. C Programming Fundamentals

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).

Previous: ArraysNext: Dynamic Memory – malloc & free