Ask coding questions

← Back to all posts
How to do to create functions in C programming ?
SouchikJoardar (0)

I'm a new student of C programming , I'm learning this for the first time .

Comments
hotnewtop
mwilki7 (1133)

Here's an example function that has no parameters, and returns 1

int returnsOne()
{
    int one = 1;
    return one;
}

int main()
{
    printf( returnsOne() );

    return 0;
}