How do i call a function in linux c


#1

I have tried the c standard
function(void)
{
}

main()
{
function();
}

I have tried:
function_name()
{
}

main()
{
name
}
and many other variations, but none of them work.


#2
#include <stdio.h>

void function_name()
{
    printf ("test");
}
int main()
{
    function_name();
    return 0;
}

I tested this and it seems to work. I think the problem was that you didn’t have the function type (void), before the declaration of the function.