At this point ‘temp’ is not initialised, so it contains garbage value (any value). This may be set to ‘0’ on your computer, but is not guaranteed to be so in case of Codechef judge.
I think it won’t matter, since there is only one line in the answer. If there had been a number of test cases in each input test file, each answer should have been printed in a newline to make them distinguishable for the computer.