need help with a delcaration

BJORNDAS%CLARGRAD.BITNET at WISCVM.WISC.EDU BJORNDAS%CLARGRAD.BITNET at WISCVM.WISC.EDU
Sun Sep 7 04:36:25 AEST 1986


Very simple question here, folks.  What is the correct way to
declare the variable in the called function below:

main()
    {
    char c = 'W';
    foo(c);
    }

foo(ch)
char ch;  /* Or should this be "int ch;" because it gets promoted? */
  {}

On my micro it MUST be declared an int; I think this is screwy, but
I'm not an expert.

---
Sterling Bjorndahl, Claremont Graduate School
BJORNDAS @ CLARGRAD on BITNET



More information about the Comp.lang.c mailing list