Lesson 08: Strings


In the , you learned about C/C++ data types. However, did you find that C/C++ does not have a data type of string? This session will discuss the string and its operations in C/C++.

In C/C++ programming, a string is a sequence of characters terminated by a null character ('\0'). Strings are commonly used to represent text data, such as names, phrases, or sentences. Unlike many other programming languages, C/C++ has no built-in string data type. Instead, strings are represented as character arrays, where the last character is always the null character.




© 2024 Air Supply Information Center (Air Supply BBS)