C Conversion Specifieres and Modifiers Flashcards


Set Details Share
created 8 months ago by ineednodecards
9 views
Conversion Specifiers and the Resulting Printed Output
updated 8 months ago by ineednodecards
Subjects:
programming languages
show moreless
Page to share:
Embed this setcancel
COPY
code changes based on your size selection
Size:
X
Show:

1

%a

floating-point number, hexadecimal digits and p-Notation

2

%A

floating point number, hexadecimal digits and P-Notation

3

%c

Single character

4

%d

signed decimal integer

5

%e

floating point number, e-notation

6

%E

floating point number, e-notation

7

%f

floating point number, decimal notation

8

%g

Use %f or %e, depending on the value. The %e style is used if the exponent is
less than −4 or greater than or equal to the precision.

9

%G

Use %f or %e, depending on the value. The %E style is used if the exponent is
less than −4 or greater than or equal to the precision.

10

%i

signed decimal integer (same as %d)

11

%o

unsigned octal integer

12

%p

A pointer

13

%s

character string

14

%u

unsigned decimal integer

15

%x

unsigned hexadecimal integer, using hex digits 0f

16

%X

unsigend hexadecimal integer, using hex digits OF

17

%%

prints a percent sign