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)
{
stack->count =0;
stack->top = NULL;
}// if
return stack;
}
What happens if an overflow occurs?
Question 11Select one:
a.
The function returns NULL.
b.
The program crashes.
c.
The function returns a pointer to a non-existing node.
d.
The program exits.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!