ChatGPT - Stack program in C