源程序:
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
char* p;
char a[80];
p = a;
int i = 0;
while((*p=getchar())!='\n')
{
p++;
i++;
}
a[i] = '\0';
for (p = a; *p!='\0';)
{
cout<<*p;
p++;
}
return 1;
}
运行结果:
标签:语言,++,char,int,include,指针 From: https://www.cnblogs.com/duanqibo/p/17777203.html