Prototype Declaration Inside a Function
main()
{
. . .
}
void prt(int vol)
{
int sum(int a, int b);
sum(. . . );
. . .
}
float prod(float x, int y)
{
. . .
}
The main() function does not know sum(). It cannot used sum (correctly).
Only the prt() function can use sum() function.
The sum() function is also not known in prod().
Previous slide
Next slide
Back to first slide
View graphic version