For C, the struct "trick" would be the way to go indeed IMO. (It's not a trick!)
I don't recommend using variadic functions for that. Would be cumbersome and error-prone, especially if you have several parameters of different types.
You can either reuse the same struct variable for subsequent calls, just modifying the fields you want modified (if the other fields are to retain their previous value), or if you want all the fields that are not explicitly set to be zeroed-out, you can use the C99 syntax (compound literals). Short example:
#include <stdio.h>
#include <stdint.h>
typedef struct
{
uint32_t n;
uint8_t m;
double x;
char s[32];
} MyParams_t;
static void MyFunction(MyParams_t *pParams)
{
if (pParams == NULL)
return;
printf("n = %u, m = %u, x = %g, s = '%s'\n", pParams->n, pParams->m, pParams->x, pParams->s);
}
int main(void)
{
MyParams_t Parameters;
// Initial values.
Parameters = (MyParams_t){ .n = 1, .x = 0.5 };
MyFunction(&Parameters);
// Only change selected fields.
Parameters.m = 2;
Parameters.x = -0.5;
MyFunction(&Parameters);
// Only set selected fields, the others will be zeroed-out.
Parameters = (MyParams_t){ .s = "Test" };
MyFunction(&Parameters);
return 0;
}