Short answer: No but Yes.
Long answer:
What you propose is typical of interpreted languages, which can
Locate functions by name at runtime.
C is compiled , and it does not allow factory to do what you indicate.
However, an approximation is possible, but with function pointers
void function1( int a ) {
...
}
void call( void ( *f )( int ), int v ) {
*f( v );
}
void ( *ptr )( int ) = function1;
call( ptr, 10 );
To select one of several functions, you can use a structure and an arrangement:
struct ident {
char *name;
void ( *ptr )( void );
};
struct ident functions[];
And you go through the arrangement looking for the indicated name.
And, if you want more flexibility, you use functions with variable arguments:
#include <stdarg.h>
void funct( const char *fmt, ... ) {
va_list ap;
va_start( ap, fmt );
...
va_end( ap );
}
and declare the pointer as
void ( *pointer )( const char *, ... );
I think that with the above and you can go pulling some code to show us ...