C has support to implement variadic functions (like printf). This is how you do it:

void printf(const char* format, ...) {
	va_list args;
	va_start(args);
	// Use args here 
	va_end(args);
}

See https://en.cppreference.com/w/c/variadic for more details.