Question: Consider the following create function of an ADT stack implementation: STACK * createStack ( void ) { STACK * stack; stack = ( STACK *
Consider the following "create" function of an ADT stack implementation:
STACK createStack void
STACK stack;
stack STACK malloc sizeof STACK;
if stack
stackcount ;
stacktop NULL;
if
return stack;
What happens if an overflow occurs?
Question Select one:
a
The function returns NULL.
b
The program crashes.
c
The function returns a pointer to a nonexisting node.
d
The program exits.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
