Listing 1: Using string literal concatenation with C99 <inttypes.h> macros to create format specifiers for scanf and printf

#include <stdio.h>
#include <inttypes.h>
int main()
{
    int_fast64_t x;
    scanf("%" SCNdFAST64, &x);
    printf("x=%08" PRIdFAST64 "\n", x);
    return 0;
}
— End of Listing —