+ 4

in c we wanted to check how many pushes cause heap overflow for array based stack

in c we wanted to check how many pushes cause heap overflow for array based stack. This code is written to int main, is this correct to check in this way, so we will be waiting to program crush and see the last printed heapoverflow_pushs? int heapoverflow_pushs=0; while(1) { push(stk,i); heapoverflow_pushs++; printf("stack overflow pushs: %d\n",heapoverflow_pushs ); }

8th Sep 2019, 6:00 PM
Zhenis Otarbay
Zhenis Otarbay - avatar
4 Respuestas
+ 5
~ swim ~ thanks
8th Sep 2019, 6:47 PM
Zhenis Otarbay
Zhenis Otarbay - avatar
+ 4
~ swim ~ i meant heap over flow
8th Sep 2019, 6:26 PM
Zhenis Otarbay
Zhenis Otarbay - avatar