#include <stdio.h>#include <stdlib.h>#include <inttypes.h> int main(void) { printf("WORD=%d\n", (int16_t) strtol("F123", NULL, 16));printf("foo=%"PRIu32"\n",(uint32_t) foo); printf("QWORD=%lld\n", (int64_t) strtol("FFFFFFFFFFFFF123", NULL, 16)); return 0;}
Standard input is empty
prog.c: In function 'main': prog.c:8:37: error: 'foo' undeclared (first use in this function) printf("foo=%"PRIu32"\n",(uint32_t) foo); ^ prog.c:8:37: note: each undeclared identifier is reported only once for each function it appears in
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!