Im currently trying to write a cache simulator in C. Whenever I run the program in bash it gives the wrong outputs, but when I run it using gdb it gives the correct