amoskimutai392 amoskimutai392
  • 18-04-2021
  • Computers and Technology
contestada

write a c program to insert and delete values from stack( to perform pop and push operations) using an array data structure

Respuesta :

livleon3010 livleon3010
  • 18-04-2021

Answer:

How to implement a stack in C using an array?

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.

Ver imagen livleon3010
Ver imagen livleon3010
Answer Link

Otras preguntas

the pair of polygons is similar. find the value of x. answer on picture
Why  might  things far away  and  long  ago  be   important   to  us now.
Why did Spain build mission in the borderlands of New Spain?
write the following ratio in simplest form : 32 min : 36 min A. 8 : 9 B. 8 : 36 C. 32 : 9 D. 128 : 144
4a + 3 - 9 = -7 + 2 + a
King Louis XVIA.He admired the revolution's principles.B.He was suspicious of the leaders of the revolution.C.He felt it was a much better revolution than the A
King Louis XVIA.He admired the revolution's principles.B.He was suspicious of the leaders of the revolution.C.He felt it was a much better revolution than the A
Why  might  things far away  and  long  ago  be   important   to  us now.
4a + 3 - 9 = -7 + 2 + a
the pair of polygons is similar. find the value of x. answer on picture