/* This function clears the screen by writing blank lines on the screen */
void clear()
{
int i;
for (i = 0; i< = 30; i++)
printf (“\n”);
}
It may be noted in the above program that the variable area is available to both the functions tri_
area()
and main(). On the other hand, the local variables base and height are available to function
tri_area only. They are neither available to main() function nor to the function clear(). Similar ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.