(Hey, "Cezar", cool name.)
This should work:
struct Foo { int a,b,c; };
void PrintFoo(struct Foo foo) { printf("Foo:%d,%d,%d\n", foo.a, foo.b, foo.c); }
That's a pass-by-value.
Here's pass-by-pointer:
void PrintFoo(struct Foo* foo) { printf("Foo:%d,%d,%d\n", foo->a, foo->b, foo->c); }
Here's pass-by-reference (C++ only):
void PrintFoo(Foo const& foo) { printf("Foo:%d,%d,%d\n", foo.a, foo.b, foo.c); }
Or am I misunderstanding your question? Such as "what is the memory layout on the stack of the structure?", which depends on the aforementioned pass-by-???? method employed.
HTH, --Eljay