#include <stdio.h>
#include <stdlib.h>
struct test
{
int a[5];
};
void print_test(struct test* a, const char* msg)
{
int i;
printf("%s:\t", msg);
for (i = 0; i < 5; ++i)
printf("%d ", a->a[i]);
printf("\n");
}
void reset(struct test* input, int start)
{
int i;
struct test tmp;
for (i = 0; i < 5; ++i)
tmp.a[i] = start + i;
*input = tmp;
}
int main()
{
struct test r1, r2, r3;
int i;
for (i = 0; i < 5; ++i) {
r1.a[i] = i;
r2.a[i] = i + 20;
r3.a[i] = i + 40;
}
print_test(&r1, "r1");
print_test(&r2, "