C Notes Help

Output Formatting

Syntax:

printf("format string", arguments...); printf("Age: %d", 25);

Common Format Specifiers

Specifier

Meaning

%d

int

%f

float/double

%c

char

%s

string (char*)

%p

pointer (address)

%x

hex (lowercase)

%X

hex (uppercase)

%o

octal

printf("%d %f %c %s", 10, 3.14, 'A', "hello"); int x = 10; printf("%p", &x);
Last modified: 25 March 2026