문제3 배열 크기 할당해서 보기

~cpp
#include<iostream>


using namespace std;


void main(){
	int *i = new int[4];
	int *a = new int[4];
	int *tmp  = new int[4];

	cin >> *i;
	cin >> *a;

	for(int j=0; j<4;j++)
     	tmp[j] = a[j] + i[j];

	cout << *tmp <<endl;
	
	delete [] i;
	delete [] a;
	delete [] tmp;
}
Retrieved from http://wiki.zeropage.org/wiki.php/데블스캠프2006/화요일/pointer/문제3/김준석
last modified 2021-02-07 05:29:06