quick question about exit() and functions
Hi. Just wondering. If I call a function that prints out a program's usage, such as,
Code:
void display_usage(void)
{
fprintf(stderr, "Usage: cvt [-dhb] number [-dhb]\n");
exit(1);
}
Is there any difference in calling exit() from within the function, as opposed to
returning to main() and then calling it from there? Such as,
Code:
int main(void)
{
display_usage();
exit(1);
}
void display_usage(void)
{
fprintf(stderr, "Usage: cvt [-dhb] number [-dhb]\n");
}
thanks :)