When using the
struct
keyword in your function declaration you have a so called "forward declaration":
struct Student;
void passStructAsParam(Student s);
struct Student
{
int rollno;
char gender;
int age;
};
I have moved the forward declaration out of the function declaration to explain what is happening.