Try below command (stack)
gcc -m32 -o lab1-ex2.exe lab1-ex2.c
Try to analysis the means of these output log.