in Programming in C
230 views
0 votes
0 votes

https://gateoverflow.in/118319/gate2017-1-36

WITH REFERENCE TO OPTIONS OF  THIS TYPE OF QUESTION...

WHAT IS THE DEFINITION OF ABNORMAL TERMINATION BECZ BOTH WILL TERMINATE AT SOME POINT OF TIME FOO() WILL ABNORMALLY TERMINATE WHEN STACK WILL OVERFLOW AND BAR() WILL BE TERMINATED BY COMPILER?????SO WHATS THE DEFINITION OF ABNORMALLY TERMINATE IS IT ONLY RELATED WITH STACK OVERFLOW ??

in Programming in C
by
230 views

2 Comments

As my point of view all runtime error causes abnormal termination. like arrayindexoutofbound, memory overflow etc....
0
0
foo() will terminate abnormally due to stack overflow. But bar() wont get terminated; it will fall in infinite loop. Since stack size is limited for bar() so it wont be terminated abnormally.
0
0

Please log in or register to answer this question.