Introduction

Learn how to use string type variables and pointers in your program.

We'll cover the following

Definition

A character array (often known as a string) is a sequence of characters stored together that are terminated by a null character \0. Programming languages use them to manipulate text such as words and sentences.

A group of characters can be stored in a character array, just as a group of integers can be stored in an integer array.

Strings can be declared in the following manner:

char c[15];

They can be initialized in the following manner:

 char c[] = "hello world"

Get hands-on with 1400+ tech skills courses.