I have the following code

char buffer [100];
struct sendMsg {
char func_id[20];
int data;
} send_msg;

....
...

int paramsignal=12;
sprintf(buffer,"%s 0 0 0 0 %d", "Sin", paramsignal);



How can I assign the containing of the struct member send_msg.func_id to be located in the buffer placed in the sprintf instead of the string "Sin"?
I have to use the sprintf function in my source code application.

Is this correct
sprintf(buffer,"%s 0 0 0 0 %d",send_msg.func_id, paramsignal);