Mega Code Archive

 
Categories / C++ / Data Type
 

Using memmove

#include <iostream> #include <string.h> using namespace std; int main() {    char x[] = "this is a test";    cout << "The string in array x before memmove is: " << x;    cout << "\nThe string in array x after memmove is:  "         << (char *) memmove( x, &x[ 5 ], 10 ) << endl;    return 0; }