Introducing C String
Learn how to declare, initialize, and handle the strings.
We'll cover the following
CString
A string, in computer science, is a sequence of characters. Almost all the programming languages implement strings in different ways.
In C language, we call it the cstring, which is stored in an array of characters ending with '\0'
or NULL
(also called the null character, which has the ASCII value of 0
). The '\0'
character marks the end of a string.
Strings are always enclosed in double quotes, while characters are always enclosed in single quotes.
Look at the following examples of strings:
Get hands-on with 1200+ tech skills courses.