Advertisement
shawon_majid

Runtime error

Apr 28th, 2022
1,890
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.     // the code won't work after runtime error
  5.     int ara[5];
  6.     int x = 5;
  7.     int y = 0;
  8.  
  9.     ara[10] = 100;
  10.     // runtime error
  11.    
  12.  
  13.     printf("%d\n", x/y);
  14.     // runtime error
  15.  
  16.     printf("hello world");
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement