C Program Swap Numbers in Cyclic Order Using Call by Reference

This program takes three integers from the user and swaps them in cyclic order using pointers.

Three variables entered by the user are stored in variables a, b, and c respectively.

Then, these variables are passed to the function cyclicSwap(). Instead of passing the actual variables, addresses of these variables are passed.

When these variables are swapped in cyclic order in the cyclicSwap() function, variables a, b, and c in the main function are also automatically swapped.

Example: Program to Swap Elements Using Call by Reference