不知道是哪里不对
#include<stdio.h>#define N 10
int main(void){
int a[N], *p;
printf("Enter %d number", N);
for(p = a; p < a + N; p++)
scanf("%d", p);
printf("In reverse order:");
for (p = a + N + 1; P >= a; p--)
printf("%d", *p);
return;
}
#include <stdio.h> #define N 10 int main(void) { int a[N]; printf( "Enter %d number: ", N ); for( int* p=a; p!=a+N; ++p ) scanf( "%d", p ); printf( "In reverse order: "); for( int* p=a+N-1; p!=a-1; --p ) printf( " %d", *p ); putchar( '\n' ); return 0; }