O stiva functionează pe principiul LIFO (Last In First Out) - ultimul element adăugat este primul care iese. Gandeste-te la o stiva de obiecte - poti adăuga sau lua doar de sus.
#define MAX_SIZE 100
// Structura stivei
typedef struct {
int array[MAX_SIZE]; // Array-ul care stocheaza elementele
int top; // Indexul varfului stivei
} Stack;