Memory Management & Pointer in C
Memory Management & Pointer in C
▪ Memory layout
▪ Variable and memory location
▪ Pointer variable
▪ Assigning values to a pointer
▪ Memory allocation for a pointer
▪ Pointer arithmetic
▪ Pass by Value & Pass by Reference
09e-BM/DT/FSOFT
12
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 09e-BM/DT/FSOFT v1/1
Pass by Value?
Swap value of 2
integer variables
A copy of the data is made and stored by way of the name of the
parameter. Any changes to the parameter have NO affect on data in
the calling function.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 09e-BM/DT/FSOFT v1/1
Pass by Value?
a and b value are not changed, their copies are changed only
🡪 Can we change those value after function call?