views:

57

answers:

1

So I have this:

int a[4] = { 0, 1, 2, 3 };

And then I want to make a new int array:

int b[4];

What is the easiest way to make b[] = a[]?

+7  A: 
memcpy(b, a, sizeof(int) * 4);
WhirlWind
Thank you very much! :)
ing0