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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!