字符指针与字符数组的初始化

#include<stdlib.h> #include<stdio.h> int main(){ char *p="hello"; char c[10]="hello"; puts(p); puts(c); c[0]='H'; //p[0]='H';不可修改 puts(c); p="world"; //c[10]="world";无法改变 //c="world";非法 puts(c); syste
相关文章
相关标签/搜索