Code generation discrepancy

Consider a simple program that constitutes a main function which return an expression.

 int main(){
  char c;
  char *pc;
  int i;
  pc = &c;
 return *pc+i+42;


The generated assembly code yield the expected result in Mars in the register $v0. However, when running it with it yields another result, I am not sure where could lie the problem.

When you copied the code into MARS, did you include the prelude?