Simple: it's not a
struct test
that you pass to the method, it's a string.
Your functionm expects a pointer to a struct:
void print1(struct test id,struct test *name)
{
printf("\n%d\n",id);
puts(name);
}
but you pass this:
print1(t1.id,&(t1.name));
Which is a char *:
struct test
{
int id;
char name[20];
};
And you pass an integer as the first value as well!
I'm not sure what you are trying to do here - I think you want to re-read your course notes and try again!