How to swap neighbor characters in string, e.g. string “DEMO” would be: EDOM
How to swap neighbor characters in string? e.g. string “DEMO” would be: EDOM
559
02-Feb-2023
Updated on 02-Feb-2023
Ravi Vishwakarma
05-Feb-2023Following is the simple C# program to swap neighbor characters in a given string,