I am very confused how to write a function which can accept 3 input parameter to calculate sum and average.the sum and average should be returned through output parameter ...
pls help ..thx
I am very confused how to write a function which can accept 3 input parameter to calculate sum and average.the sum and average should be returned through output parameter ...
pls help ..thx
Please quote the exact problem because what you posted doesn't make a lot of sense. One possibility is this:
void foo( int a, int b, int c, int*sum, int* average)
{
}
void name(int a,int b,int c,int &sum,int &avg){ }
"&" mean referring a variable , this is a way by which function return more than one value.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.