3
Contributors
5
Replies
24
Views
3 Years
Discussion Span
Last Post by iqra aslam
2

Sounds like homework.

If you know how to use functions, then you should already be able to answer this question. If you don't know how to use functions, then look at whatever resource you're using to learn. If you don't have a resource to learn from, then we'll point you to one.

Edited by Hiroshe

Votes + Comments
i got the point thank u
0

i want to know "return" keyword is used to return the value back to the calling function.
if we don't use return then there is no value returned to the function?

3

if we don't use return then there is no value returned to the function?

It's not quite that simple. For extra credit, try to explain what's happening here:

#include <stdio.h>

int foo()
{
}

int main(void)
{
    printf("%d\n", foo());
    return 0;
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.