I am using 64 bit gcc compiler on a intel machine to compile following code
void main(void) {
unsigned long L = 1, R = "123";
printf("%s %lu %lu", "1st",L, R);
printf("%s %d %s", "2nd", L, R);
}
I get following output
1st, 1, 4205913
2nd, 1, 123
my confusion is that when I take %lu what is this number 4205913 while when I take %s "123" is printed correctly.