How to short unsigned char in C

3 Answers

0 votes
#include <stdio.h>

typedef unsigned char uchar;

int main(void)
{
    uchar ch = 'a';

    printf("%c", ch);

    return 0;
}




/*
run:

a

*/

 



answered Feb 9, 2023 by avibootz
0 votes
#include <stdio.h>

typedef unsigned char u8;

int main(void)
{
    u8 ch = 'a';

    printf("%c", ch);

    return 0;
}




/*
run:

a

*/

 



answered Feb 9, 2023 by avibootz
0 votes
#include <stdio.h>

#define UCHAR unsigned char

int main(void)
{
    UCHAR ch = 'a';

    printf("%c", ch);

    return 0;
}




/*
run:

a

*/

 



answered Feb 9, 2023 by avibootz

Related questions

2 answers 574 views
574 views asked Aug 8, 2019 by avibootz
1 answer 116 views
1 answer 90 views
1 answer 121 views
121 views asked Feb 10, 2023 by avibootz
3 answers 195 views
195 views asked Feb 9, 2023 by avibootz
1 answer 141 views
...