C - Is it possible to have a function that return a char * or an int?
<p>Is it possible to get a function to return an int or a char* depending on what happened when executed ? I've tried void but at the compilation I get a lot of warning</p>

<p>Example </p>

<pre><code>void int_char(char *str)
{
    if (I 'm matching a condition in my string)
        return (str);
    else
        return (0);
}
</code></pre>

<p>I hope I am clear enough.
PS : I'm a beginner in C programming</p>