// ConsoleApplication4.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "iostream"
#include "cstring"
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	char str_1[]="abc";
	char str_2[]="def";
	cout<<str_1<<endl;
	cout<<str_2<<endl;
	strcpy_s(str_2,str_1);
	cout<<str_1<<endl;
	cout<<str_2<<endl;
	strncpy_s(str_2,str_1,2);
	cout<<str_1<<endl;
	cout<<str_2<<endl;
	system("pause");
	return 0;
}

