Strings
In C strings are represented by the pointer type char*
. Under the hood they are stored as a list of characters, where the final character is a special character called the null terminator. Strings are a complicated and important part of C, which we’ll learn to use effectively in the next few chapters.
Strings can also be declared literally by putting text between quotation marks. We used this in the previous chapter with our string "Hello, World!"
. For now, remember that if you see char*
, you can read it as a string.
当前内容版权归 orangeduck 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 orangeduck .