0
can anyone explain to me why this is not working?
#include<stdio.h> #define N 10 int main(void) { int a[N],t,*p,*q; printf("please input %d amount of number:",N); for(p=a;p<a+N;p++) scanf("%d",p); p=a; q=a+N-1; // printf(p=a;p<a+N;p++) printf("%d",*p); printf("\n"); return 0; }
2 Réponses
+ 2
p = new int [N];
for(int i=0; i<N; i++) scanf ("%d",p[i]);
0
why you have two arrays with the same data?