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; }

6th Jun 2017, 3:06 AM
Ibrahim UG
2 Antworten
+ 2
p = new int [N]; for(int i=0; i<N; i++) scanf ("%d",p[i]);
6th Jun 2017, 3:20 AM
Andrés04_ve
Andrés04_ve - avatar
0
why you have two arrays with the same data?
6th Jun 2017, 3:17 AM
Andrés04_ve
Andrés04_ve - avatar