Question: Write a C function called swapChar1 that swaps the first character with the last character in the string passed to this function as the only
Write a C function called swapChar1 that swaps the first character with the last character in the string passed to this function as the only parameter. For example, the original string "abcdef" should become "fbcdea" after the execution of this function. In the implementation reference the string elements using pointers and not using the conventional array indexing with the square bracket convention, i.e. do not use the a[i] construct.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
