adding two charss intoa short wrong answer c : Hi I have a function that is aimed at getting the value of two chars added together into a short. it seams that the value is getting cut off or mangled.

here is my code:

    void add(char a, char b){
        unsigned short x = a + b;
        printf("init:%hu %hu = %hu\n", (unsigned char)a, (unsigned char)b,  (unsigned short)x);
    ...

    unsigned char x = add((unsigned char)230, (unsigned char)100);
    unsigned char y = add((unsigned char )200, (unsigned char)200);
    unsigned char z = add((unsigned char) 230, (unsigned char)120);

    and the results are
    init:230 100 = 74
    init:200 200 = 65424
    init:230 120 = 94
