If you don't have any value for the corresponding %d its the garbage that is printed and luckily or unluckily your compiler has the 4 in the garbage location which you are printing in the code.