Show all your work 4 Which one is not the correct function definition? a, int b
ID: 3551487 • Letter: S
Question
Show all your work
4 Which one is not the correct function definition? a, int b (a) void sum (int x, int y) (b) int mult (int int c; int result; result y; return c; return result; (d) double sq double y) (c) void sq (double y return y yi double result; result y cout result endli 5 Which statement is not true? assigned by a (a) A variable with type of unsigned int cannot be negative value. (b) A function's parameters are local variables. function to (c) The function srand0 is used to seed the rand0 for each produce the same sequence of random numbers execution of the program. be found in (d) The function prototype for the sqrt0 function canExplanation / Answer
Q4.a is not the correct function as it is defined as void but returns an integer.
Q5.
c)the function srand() is used to seed the rand() function to produce the same sequence of random numbers
6.Q 1 is not provided.
Q7.
y=(sqrt(b)*cos(3*a+b))+((2+a)/(3+b));
Q8.
//denote the set by array a.
then
statement:
cout<<a[(rand()%7)];
Q9.
the revised code:
#include<iostream>
using namespace std;
int cube(int );
int main()
{
int sum;
for(int i=0;i<=100;i++)
sum+=cube(i);
cout<<"sum = "<<sum<<endl;
return 0;
}
int cube(int x)
{
int result=x*x*x;
return result;
}