数组指针
#include<iostream>
#include<string.h>
using namespace std;
void print(char C[])
{
int i=0;
while(C[i]!='\0')
{
printf("%c",C[i]);
i++;
}
printf("\n");
}
void print1(char *C)
{
int i=0;
while(C[i]!='\0')
{
printf("%c",C[i]);
i++;
}
printf("\n");
}
void print2(char *C)
{
int i=0;
while(*(C+i)!='\0')
{
printf("%c",C[i]);
i++;
}
printf("\n");
}
void print3(char *C)
{
int i=0;
while(*C!='\0')
{
printf("%c",*C);
C++;
}
}
int main()
{
char C[]="HELLO";
print(C);
print1(C);
print2(C);
print3(C);
return 0;
}