need help with a delcaration

SCHEUTZOW,MICHAEL J gt6294b at gitpyr.UUCP
Mon Sep 8 23:58:15 AEST 1986


In article <3594 at brl-smoke.ARPA> BJORNDAS%CLARGRAD.BITNET at WISCVM.WISC.EDU writes:
>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