Yes.. I'm a little tired, but I don't see any problems there.. other than style. The AREA will be calculated at compile time and is treated as literal constant.
Better (safer) style would be to write
C:
#define LEN (50)
#define WID (20)
#define AREA ((LEN)*(WID))
int TotalArea(int num)
{
int retTotalArea = num * AREA;
return retTotalArea;
}
The parentheses are important in the AREA define if and when you use the AREA in more complicated equation. And if you modify the LEN and WID to something more complicated also.