Computer Science, asked by rashmivk30, 6 months ago

Give the prototype of a function named check() that accepts 2 integers as

parameters and return either true or a false​

Answers

Answered by saxenrajesh857
0

Answer:

BY MARSHALL BRAIN & CHRIS POLLETTE

Functions: Function Prototypes

It is now considered good form to use function prototypes for all functions in your program. A prototype declares the function name, its parameters, and its return type to the rest of the program prior to the function's actual declaration. To understand why function prototypes are useful, enter the following code and run it:

#include <stdio.h>

void main()

{

printf("%d\n",add(3));

}

int add(int i, int j)

{

return i+j;

}

This code compiles on many compilers without giving you a warning, even though add expects two parameters but receives only one. It works because many C compilers do not check for parameter matching either in type or count. You can waste an enormous amount of time debugging code in which you are simply passing one too many or too few parameters by mistake. The above code compiles properly, but it produces the wrong answer.

Explanation:

I hope this is helpful and please marke me bairlest

Similar questions