>>7you don't need to stuff error codes inside returned vars
Its from the time stdlib was developed.
now you can put error codes anywhere, and send them to func
int func3(int param, int* error_code_returned_here){
if(param==0) {*error_code_returned_here=1;return 1;}
return param/3;}