Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Which is the better implementation?

Name: Anonymous 2014-09-05 19:47

int main()
{
printf("5+6=%d", 5+6);
return 0;
}


Or

////////////////////////////////////////
// AddNumbers
// param1 firstParam - The first value to add
// param2 secondParam - The second value to add
// return - The firstParam added to the secondParam
//
int addNumbers( int firstParam,
int secondParam )
{
// Here is some info
int theReturn = firstParam + secondParam;

// Now return the value
return theReturn;
}

// Entry for program
int main()
{
// Initialize variables
int firstParam = 5;
int secondParam = 6;

// Call the function
int returnValue = AddNumbers( firstParam, secondParam );

// Print out the value
printf("%d+%d=%d", firstParam, secondParam, returnValue );

return 0;
}

Name: Anonymous 2014-09-06 22:17

>>14

What if your anus has more than one function?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List