You yourself put the answer to the question in the Question. the answer is paragraph. lol
Class newprog
{
public static void main()
{
System.out.println("Hello world");
}
}
Answer:
<u>How to implement a stack in C using an array?</u>
A stack is a linear data structure that follows the Last in, First out principle (i.e. the last added elements are removed first).
This abstract data type can be implemented in C in multiple ways. One such way is by using an array.
Pro of using an array:
No extra memory required to store the pointers.
Con of using an array:
The size of the stack is pre-set so it cannot increase or decrease.
I've included my code in the picture below. Best of luck.
Answer: Digital Paintings