C program to swap adjacent characters of a string
Given a string and we have to swap its adjacent characters using C program.
Here, to swap adjacent characters of a given string - we have a condition, which is "string length must be EVEN i.e. string must contains even number of characters".
Example:
Input:
String: "help"
Output:
String: "ehpl"
Input:
String: "Hello"
Output:
The length of the string is Odd..
Program to swap adjacent characters of a string in C
Output
need an explanation for this answer? contact us directly to get an explanation for this answer