And when we return the string to you we're essentially telling you where this chunk of memory is.
当我们返回该字符串时,我们实际上是告诉你,这块存储单元位于哪里。
0 And we'll also see backslash 0 which is actually the special character that's used at the end of a string to say no more string after this point in memory.
还有0,用于存储器中字符串末尾,表示在此之后就,没有字符了。
It's just a chunk of characters back to back to back so this is storing at the very first location in the string what?
它只是一串紧邻的字母串,所以它把什么存储在,字符串的第一个地址下?
Somewhere in memory, back to back to back or all of the strings and with them can we store actual words and phrases.
在内存某处,紧邻的或者所有的字符串,我们用它们可以存储实际的单词,和短语。
We've been using strings thus far to get input from user and store it in variables.
迄今为止,我们用字符串来接受用户的输入,然后存储在变量里。
I want an actual copy in memory so that that string is in two different places.
我想要在内存中有一个拷贝,把字符串存储在,两个不同的地方。
This is copy2.c. At the very beginning I, again, demand say something and then I declare s1 to be a string, aka char *, and I store in s1 the string the user types in.
这是copy2。c,在开头打印一句话,然后声明s1是一个字符串,也叫做char,*,然后把用户输入的字符串存储在s1中。
I store in s1 the address of the first byte that the user typed in and by the way that first bite happens to live in this new place called the heap and that's the only update to the story thus far.
我在s1中存储的是用户输入的字符串的首地址,这样第一个字节存储在这块,新的堆的地方,这个是唯一的修正。
应用推荐