Swapping Of Two Numbers In C Using Temporary Variable This is the most straightforward and commonly used approach to swap two numbers inC language. The temporary variable method is also referred to as swapping two numbers with a third variable. Here are the general steps to write andrun a C ...
C - Swap function of elements in array, Correction : swap (array [0],array [2]); // if you want to pass the values as parameters. //or swap (array, array); // for passing pointers to the array ( pass by reference ) You can read about pass by value and pass by reference. A...