#include "main.h"
#include <stdio.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <signal.h>
#include <string.h>
#include <stdlib.h>
#include <io.h>
int main()
{
//字符指针读一切 写需要权限。。。。
char* pstr = "hello"; // 字符指针 字符常量 这些字符所存储的地址(在常量区)
char buf[] = "hello";
while((*pstr)!=' ') // 这里 *pstr++有问题
{
putchar(*pstr);
pstr++;
putchar('
');
}
//printf("%c
",*(buf++)); 数组名是一个常量
//strcpy(pstr,"wro");// 字符串常量是一个地址
pstr = (char*)buf;
while((*pstr)!=' ') // 这里 *pstr++有问题
{
putchar(*pstr);
pstr++;
putchar('
');
}
strcpy(pstr,"wro");//
//strcpy(pstr,"wro");//
//printf("pstr is %s
",pstr);
for(;;);
return 0;
}