printf conversion specifiers Flashcards
1
Q
%
A
display a % character (no arg is required)
2
Q
b
A
display arg as a binary integer
1111011
3
Q
c
A
display ascii character for the arg
{
4
Q
d
A
display arg as a signed decimal integer
123
5
Q
e
A
display arg using scientific notation
1.23000e+2
6
Q
f
A
display arg as floating point
123.000000
7
Q
o
A
display arg as an octal integer
173
8
Q
s
A
display arg as a string
123
9
Q
u
A
display arg as an unsigned decimal
123
10
Q
x
A
display arg as a lowercase hexadecimal
7b
11
Q
X
A
display arg in uppercase hexadecimal
7B
12
Q
sprintf
A
send the output to another variable rather than to the browser. useful for making conversions. for example:
$hexstring = sprintf(“%X%X%X”, 65, 127, 245);