How and When to use Pointer in C programming

here in this code the swap function will not return the value as swapped but it’s working locally

code:

output:

 

so we need to work with address swapping and by sending address from the main function we are sending values using pointer in swap function

code:

output:

vid:

 

personally saying this vid cleared up my thoughts about pointer perfectly. Thanks to Shibaji 🙂