Possible Duplicate:
How to modify content of the original variable which is passed by value?
I am building a
You need to assign the return value of FindArea to rArea. At the moment, FindArea assigns the product to its local variable of the same name.
Alternatively, you can pass the address of main's rArea to modify that, that would look like
FindArea(&rArea, rBase, rHeight);
in main with
void FindArea(int * rArea, int rBase, int rHeight) {
*rArea = rBase * rHeight;
}