Ive have been reading several books regarding this topic, and all books state that the return statement can only return one value of result.
How does this happen when you can return something like this to the user:
*********
* 222222 *
*********
Is that above a single result?
Also, I see some programs having the void function like this:
int
main(void)
{
// Block of Code
}
How can this be void when it prints something on the screen?
Okay, here is a code from the book:
Code:void
sperate(double num, char *signp, int *wholep, double *fracp)
{
double magnitude;
if(num < 0)
*signp = ' - ';
else if(num == 0)
*signp = ' ';
else
*signp = ' + ';
magnitude = fabs(num);
*wholep = floor(magnitude);
*fracp = magnitude - *wholep;
}
Now, in the above code, it says void, meaning this function does not return a result??? but it does, doesnt it? That what im getting confused about.