Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Dressed the naked link.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

http://en.wikipedia.org/wiki/Printf_format_stringprintf (Wikipedia) seems to say that it's for decimal as I had guessed:

d,i

int as a signed decimal number. '%d' and '%i' are synonymous for output, but are different when used with scanf() for input (using %i will interpret a number as hexadecimal if it's preceded by 0x, and octal if it's preceded by 0.)

http://en.wikipedia.org/wiki/Printf_format_string seems to say that it's for decimal as I had guessed

d,i

int as a signed decimal number. '%d' and '%i' are synonymous for output, but are different when used with scanf() for input (using %i will interpret a number as hexadecimal if it's preceded by 0x, and octal if it's preceded by 0.)

printf (Wikipedia) seems to say that it's for decimal as I had guessed:

d,i

int as a signed decimal number. '%d' and '%i' are synonymous for output, but are different when used with scanf() for input (using %i will interpret a number as hexadecimal if it's preceded by 0x, and octal if it's preceded by 0.)

Source Link
Ruan Mendes
  • 92.7k
  • 31
  • 161
  • 225

http://en.wikipedia.org/wiki/Printf_format_string seems to say that it's for decimal as I had guessed

d,i

int as a signed decimal number. '%d' and '%i' are synonymous for output, but are different when used with scanf() for input (using %i will interpret a number as hexadecimal if it's preceded by 0x, and octal if it's preceded by 0.)