basics
high priority
!
* / %
+ -
< > <= >=
== !=
&&
||
=
low priority
const uint8_t* data;
printf("%02x:", data[i]);
Mixed mode operation : int/ float variable = (int/ float variable2) % (int/ float variable2)
Precedence:
* / %
+ -
=
Associativity
* / have Left to right associativity
a = b / c * d ----- unambiguous left operand have priority
= have Right to left associativity
a = b = 3 ----- unambiguous Right operand have priority
printf()
%d in integer form
%o in octal form
%x or %X in hexadecimal form
%d 012 -> decimal equiv of octal 12
%d 0xa -> decimal equiv of hexa a
+ve % +ve = +ve
-ve % +ve = -ve
+ve % -ve = +ve
-ve % -ve = - ve
Exact-width integer types
Integer types having exactly the specified width
typedef signed char int8_t
typedef unsigned char uint8_t
typedef signed int int16_t
typedef unsigned int uint16_t
typedef signed long int int32_t
typedef unsigned long int uint32_t
typedef signed long long int int64_t
typedef unsigned long long int uint64_t
Integer types capable of holding object pointers
These allow you to declare variables of the same size as a pointer.
typedef int16_t intptr_t
typedef uint16_t uintptr_t
Minimum-width integer types
Integer types having at least the specified width
typedef int8_t int_least8_t
typedef uint8_t uint_least8_t
typedef int16_t int_least16_t
typedef uint16_t uint_least16_t
typedef int32_t int_least32_t
typedef uint32_t uint_least32_t
typedef int64_t int_least64_t
typedef uint64_t uint_least64_t
Fastest minimum-width integer types
Integer types being usually fastest having at least the specified width
typedef int8_t int_fast8_t
typedef uint8_t uint_fast8_t
typedef int16_t int_fast16_t
typedef uint16_t uint_fast16_t
typedef int32_t int_fast32_t
typedef uint32_t uint_fast32_t
typedef int64_t int_fast64_t
typedef uint64_t uint_fast64_t
Greatest-width integer types
Types designating integer data capable of representing any value of any integer type in the corresponding signed or unsigned category
typedef int64_t intmax_t
typedef uint64_t uintmax_t