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

LIFO.

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:
http://en.wikipedia.org/wiki/Stack_(data_structure)

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.