Prototype Declaration Outside a function
main()
{
. . .
}
int sum(int a, int b);
void prt(int vol)
{
sum(. . . );
. . .
}
float prod(float x, int y)
{
. . .
}
The main() function does not know sum(). It cannot used sum (correctly).
The functions following the sum prototype declaration can use sum() function.
Previous slide
Next slide
Back to first slide
View graphic version