Data structure - Can a stack be described as a pointer? Explain

Can a stack be described as a pointer? Explain.

Stack can be described as a pointer as it contains a head pointer always pointing to the topmost element of the stack. The Push and Pop operations are performed using this pointer.

Can a stack be described as a pointer? Explain.

A stack is represented as a pointer. The reason is that, it has a head pointer which points to the top of the stack. The stack operations are performed using the head pointer. Hence, the stack can be described as a pointer.
Data structure - What is the recursion?
Recursion - Recursion is an approach in which a function calls itself with an argument......
Data structure - Is it possible to insert different type of elements in a stack? How?
Insert different type of elements in a stack - Different elements can be inserted into a stack. This is possible by implementing union / structure data type.......
Data structure - Explain in brief a linked list
Linked list - A linked list is a dynamic data structure. It consists of a sequence of data elements and a reference to the next record in the sequence.......
Post your comment