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 0s 5284KB
stdin
3
1
2
1
stdout
Enter the no. of elements:5414
Enter 3 elements
0