📔
Notes
  • Embedded systems
    • GPIO concepts
    • 📈SPI protocol
    • 📈I2C Protocol
    • 📈UART Protocol
    • 📈CAN Protocol
    • 📈DMA
  • FreeRTOS / RTOS
    • Basics
    • Stm32 FreeRTOS setup
  • Interview Questions
    • Basic C
    • Electronics / mcu
  • Hardware design
  • C programming
  • C++ programming
    • Basics
  • Data structure and Algorithms
    • Data Structures in C
  • Design Patterns
  • Algorithms
  • OS concepts
  • VLSI
  • DSP
  • Motors and sensors
    • BLDC motor
  • Important/ intersting documents
Powered by GitBook
On this page
  • Precedence and Associativiy
  • printf format specifiers
  • Type-specifier
  • Function recursion

C programming

C programming short notes

Precedence and Associativiy

Use PUMA' S REBL TAC. ( spell "REBL" as if "REBEL").

(Note: all operators with associativity not specified is left to right).

P - Primary

U - Unary

M - Multiplicative

A - Additive

S- Shift

R- Relational

E- Equality

B- BitWise ( & > ^ > |)

L- Logical ( logical && > logical ||)

and the last three operators are

T- Ternary

A- Assignment

C- Comma

If you need a shortcut for Assosiativity then "AUTo rides in the right side", meaning Assignment, Unary and Ternary operators are Right to Left, O is added for completion)

printf format specifiers

Type-specifier

volatile , const , restrict(C99)

Function recursion

a function that calls itself : example fib(n) = f(n-1) + f(n-2)

remeber space-time tradeoff , thabove algorith is not saving time but space in memory(ram)

Struct

Bitfield

Union

PreviousHardware designNextC++ programming

Last updated 2 months ago

printf - C++ Reference
Logo