/*
Nome: Mario
Cognome: Montanari

strcpy()
*/

#include <iostream>
#include <cstring>

#define SIZE 100+1

using namespace std;

char *strcpy(char *dst, const char *src);

int main(void) {
	char src[SIZE] = "mario.montanari@studenti.itisravenna.it";
	char dst[SIZE];
	char *ptr;
	
	ptr = strcpy(dst, src);
	
	cout << src << endl;
	cout << ptr << endl;
	
	return 0;
}

char *strcpy(char *dst, const char *src) {
	const char *ptr = dst;
	
	while (*src) {
		*dst = *src;
		dst++;
		src++;
	}
	
	*dst = '\0';
	
	return (char*)ptr;
}