fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n,arr[n];
  5.  
  6. printf("Enter the no. of elements:%d\n",n);
  7. scanf("%d",&n);
  8.  
  9. printf("Enter %d elements\n",n);
  10. for(int i=1;i<=n;i++){
  11. scanf("%d ",&arr[i]);
  12. }
  13. printf("%d",arr[0]);
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 5312KB
stdin
5
1
1
1
stdout
Enter the no. of elements:5360
Enter 5 elements
0