(10%)
Determine whether the following code is correct or not. If it is
correct, predict its output. If it is incorrect, point out the
mistake(s).
// Definition of a struct to represent rectangles
#include <iostream>
struct RECTANGLE
{
int
Left;
// Top-left point
int
Top;
// coordinate pair
int
Right;
// Bottom-right point
int
Bottom;
// coordinate pair
}
long Area(const RECTANGLE aRect) // Pass by value
{ return (aRect.Right - aRect.Left)*(aRect.Bottom - aRect.Top); }
int main()
{
RECTANGLE Hut = { 10, 20, 30, 40 };
std::cout << Area(Hut) << std::endl;
return 0;
}