can anyone show me the problem of the below code?it show segmentation fault.my idea is to let user input number to define the size of the array. please help!
Code:#include<stdio.h> main() { int a; int *i; int array[*i]; int j; scanf("%d",&j); i=&j; scanf("%d",&array[0]); printf("%d\n",array[0]); }