Multiple return statements is perfectly valid in C/C++. But make sure that at least one of the return statements is always executed. The following function is incorrect,
int foo(int x)
{
if(x>0)
{
return 1;
}
else if(x==0)
{
return 0;
}
else
{
// No return in this block
}
}
such situations should be avoided in C/C++.