Could we pass the arguements to inside function from outside function

I have two functions abc() and cdf(). I have called cdf in abc. I had passed input to abc() and passed nothing to cdf(). but in cdf() i require the the input values as i passed in abc() so can i use the inputs of abc() into cdf() without passing inputs in cdf().

void main()
{
void function abc(int a, int b )
{

cdf();

}

function cdf()
{
int c;
c = a*b;
return c;
}

abc(10,20);

}

Regards
cam
Last edited on
The syntax above is pretty tangled up.
Here it is straightened out a bit:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
int cdf(int a, int b)
{
    int c;
    c = a*b;
    return c;
}

void abc(int a, int b )
{
    cdf(a, b);
}

int main()
{
    abc(10,20);
}
Topic archived. No new replies allowed.