background
loading scroll to btns
Back To Home
notes
2 min readSeptember 2, 2023

🍼 pointers

fundamentals
c/cpp

what is a pointer

a pointer is a variable that holds an address of another variable

why is it useful

  • it is used to return multiple data from a function
  • useful to understand call by value and call by reference

size of the pointer

In C size of a pointer is not fixed as it depends on Word size of the *processor.

In general a 32-bit computer machine then size of a pointer would be 4 bytes while for a 64-bit computer machine, it would be 8 bytes.

notes

  • In C size of a pointer is not fixed as it depends on Word size of the processor.

In general a 32-bit computer machine then size of a pointer would be 4 bytes while for a 64-bit computer machine, it would be 8 bytes.

Comments