C++ Program to exchange the positions of strings stored in array using array of pointers.
C++ Program to exchange the positions of strings stored in array using array of pointers. #include <iostream> #include <string.h> using namespace std; int main() { char* names[] = { “Yugal”, “Kamal”, “Pankaj”, “Vinay”, “Anil” }; int len = 0; len = strlen(names[1]); //length of string no 2 cout<<“\nOrginally string 2 is “; cout.write(names[1],len).put(‘\n’); cout<<“and string 4 is “; … Read more