#include <stdio.h>
#include <string.h>
int main()
{
int i;
char a[10];
for(i=0;i<10;i++)
{
scanf("%s",a);// >how this line is working in memory.
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
在上面的代码中,我想知道字符串是如何保存在内存中的,因为我已经将它初始化为1D字符数组,但是数组是作为字符串列表还是单个字符串工作?为什么?
c ×1