return sign number

1
2
3
4
5
6
7
#include <stdio.h>

int main() 
{ int a=3,b=4;
  a=a-b;
  return a;
}


program returns me 255. i understand cause. hence, return treats a as byte. i want that return interpret a as int, because main has type int consequently she has to return int.
i don't want to use printf here. i want return int. how can i say compiler how to treat a?
What operating system are you running on?
Topic archived. No new replies allowed.