Optional arguments in C function

In a C function, I want to check if an input argument (‘value’ in my case) is presented or not.

i.e.:

void Console(char string[], int32_t value)
{
    // write string here
    // write value here, if it exists
}

When used if(value != NULL) statement, my Console() function sends 4096

How can I check and act based on argument existence?

Leave a Comment