How to declare fixed-width integer type in C

1 Answer

0 votes
#include <stdio.h>
#include <stdint.h>

int main(void) 
{
    uint8_t ui8 = 8;  // 8-bits 

    uint32_t ui32 = 32; // 32-bits 

    int64_t i64 = 64;  // 64 bit 
    
    printf("ui8 = %u\n", ui8);
    printf("ui32 = %I32d\n", ui32);
    printf("i64 = %I64d\n", i64);
    
    return 0;
}
    
/*
run:
 
ui8 = 8
ui32 = 32
i64 = 64

*/

 



answered Aug 24, 2017 by avibootz

Related questions

2 answers 156 views
2 answers 205 views
2 answers 167 views
2 answers 170 views
1 answer 188 views
...