What are the advantages of function prototyping in c++?
Answers
Answered by
1
Hey Mate here is your answer
Advantages of function prototype: - It helps the compiler in determining whether a function is called correctly or not. Each time when a function is called, its calling statement is compared with its prototype. In case of any mismatch, compiler reports an error. Float amount ( int p, int n, float r)
Thanks
be happy live longer
Advantages of function prototype: - It helps the compiler in determining whether a function is called correctly or not. Each time when a function is called, its calling statement is compared with its prototype. In case of any mismatch, compiler reports an error. Float amount ( int p, int n, float r)
Thanks
be happy live longer
Answered by
0
Advantages of function prototyping:-
=> Enables a compiler to carefully compare each use of the function with the prototype to determine whether the function is invoked properly i.e., the number and type of arguments are compared and any wrong number or type of the arguments is reported.
=> Tells the program about the return type .
=> Tells the program the number and type of arguments.
=> Enables a compiler to carefully compare each use of the function with the prototype to determine whether the function is invoked properly i.e., the number and type of arguments are compared and any wrong number or type of the arguments is reported.
=> Tells the program about the return type .
=> Tells the program the number and type of arguments.
Similar questions