I assume you're working on C or C++.
1) Rarb() takes no arguments and has no return value.
void Rarb();
// void is the return value: none
2) Mains() takes a float argument and returns an int.
int Mains(float x);
You can do the rest in a similar way.
construct function prototypes for descriptions given below:
1) Rarb() takes no arguments and has no return value.
2) Mains() takes a float argument and returns an int.
3) San() takes two double arguments and returns a double.
4) Sum() takes an int array and an int value and returns a long result.
5) Check() takes a string argument and returns an int.
4 answers
pls tell rest of us too bcs i don't know very much about this
You'll need to review the notes and give an attempt.
By giving the answers coming from someone else, you will not be able to pass your exam, or even worse, be able to work independently if you ever get hired to do the work.
Review the work and post your attempted answers. I'll be more than pleased to help correct them.
Here are some more hints:
If you are working on C, then the return types can only be the primitives, such as,
int, float, double, char, short, long, etc. Same goes for the arguments.
In C, string arguments are represented by an array of characters, for example, a method returning an int with two arguments, an int and a string would be written as:
int main(int argc, char* argv[]);
By giving the answers coming from someone else, you will not be able to pass your exam, or even worse, be able to work independently if you ever get hired to do the work.
Review the work and post your attempted answers. I'll be more than pleased to help correct them.
Here are some more hints:
If you are working on C, then the return types can only be the primitives, such as,
int, float, double, char, short, long, etc. Same goes for the arguments.
In C, string arguments are represented by an array of characters, for example, a method returning an int with two arguments, an int and a string would be written as:
int main(int argc, char* argv[]);
So how can I check my answer