csci4061/notes/03-process-basics-code/overflow.c

17 lines
267 B
C
Raw Normal View History

2018-01-29 23:28:37 +00:00
#include <stdio.h>
// This program traverses stuff that it really ought not to...
int main(int argc, char *argv[]){
char a[3] = {'A','B','C'};
int i = 0;
while(1){
printf("%c",a[i]);
i++;
if(i%40 == 0){
printf("\n");
}
}
return 0;
}