// Making a copy of a string of type char
#include <iostream>
using namespace std;

void srtCopy(char *, char *);

int main(){
  char x[10] = "Hello", y[10];

  srtCopy(x, y);

  cout << "x = " << x << endl;
  cout << "y = " << y << endl;

  return 0;
}

// Makes a copy of str1
void srtCopy(char *str1, char *str2){
  while(*str1 != '\0')
    *(str2++) = *(str1++);
  *(str2++) = '\0';
}
