what is the basic use of keyword return?
if we donot use it what is the effect?

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.

commented: 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?

i got the point
thank u soo much

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;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.