
20 Aug
2013
20 Aug
'13
08:22
Marek Paśnikowski <marekpasnikowski@marekpasnikowski.name> writes:
unsigned long int var; var=ULONG_MAX; printf("%ld",var);
When executed, the last statement of the three prints out "-1" .
This is correct. If you want to print out an unsigned integer use %u, %d expects a signed integer. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org