c place holder code example

Example: c lang placeholders

Most common placeholders used in C as follows.

Specifiers
%c - a character
%s - a string
%d - a decimal integer
%o - an octal integer
%x - a hexadecimal integer
%p - an address (pointer)
%f - for floats
%e - a floating point number in scientific notation
%E- a floating point number in scientific notation
%%- The % symbol
Filed width and precision
%06d would print 456 like ;- 000456).
Escape Sequences.
more often used /t, /n
Large numbers
Long long int - lld
Long float ——lt

Tags:

C Example