please help me in writing a code to implement stack using arrays , does stack follow LIFO or FIFO principle?


Stack using arrays...? It might be a better exercise to implement a stack struct (that can be easily resized and whatnot). But if you really want...then I guess we could work through one with an array...

But first, read about stacks here:

Once you understand the data structure, come back with your attempts and we can go from there.