Returning a struct from function
问题 I'm trying to understand how to return a struct from a function but I'm completely lost. Here is the code: void initialize_server(struct data host_port){ printf(" Set IP Address (X.X.X.X): "); fgets(data.host, sizeof(data.host), stdin); strchomp(data.host); printf(" Set Port: "); fgets(data.port_inc, sizeof(data.port_inc), stdin); strchomp(data.port_inc); return data; } and heres the code from the .h struct data{ char host[16]; char port_inc[8]; }; void initialize_server(struct data host_port