Hello, I need to know how to pass structures from one function to another as well as the correct syntax for the Prototype and function call as well as the function itself..
Code:#include <stdio.h> struct names{ char fname[20]; char lname[20]; struct name *next; } /*Prototype*/ void function1(????) int main () { struct name *header; struct name *current; header->next=NULL; current=header; function1(??????); } void function1(??????) { struct name newnode; newnode=(struct name *)malloc(sizeof(struct name)); newnode->next=header->next; header->next=newnode; }
any assistance would be appreciated.
Thanks.