fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int arra[100];
  6. for(int i=0;i<100;i++)
  7. arra[i] = i;
  8. printf("%d\n",arra[1000]);
  9. int *arrb = (int *)malloc(10*sizeof (int));
  10. for(int i=0;i<10;i++)
  11. arrb[i] = i;
  12. printf("%d\n",arrb[-1]);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 4516KB
stdin
Standard input is empty
stdout
0
0