answersLogoWhite

0

int max(int arr[], int arrSize)
{
int maximum = arr[0];
for (int i = 0; i < arrSize; i++)
{
if (maximum < arr[i])
{
maximum = arr;

}

}

return maximum;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What module returns a value back to the part of the program that called it?

A function. You can have a function that returns but doesn't return a value with it.


What is the function that returns the largest value in a set of values?

MAX


What is a named operation that returns a value in the Excel program used to simplify formulas?

A function.


Can you write a program without specifying the prototype of any function?

You can write a program without specifying its prototype when the function returns an integer.If the prototype is not mentioned the compiler thinks that the return type of the function used is integer.When making program which return integer you can ignore writing the protoype.


What is the difference between simple program and function in C?

A function is a piece of code that has no or more arguments, that returns no or one value. A program is code that implements the function int main(int argc, char** argv). As such, a function and a program are the same, but the program also includes compiler directives to "include" other things, such as standard headers, i.e. #include .


A function takes the exponential function's output and returns the exponential function's input?

A __________ function takes the exponential function's output and returns the exponential function's input.


Why is returning a pointer to a local variable a logical error?

Local variables automatically fall from scope when a function returns. If the function returns a pointer to one of its local variables and you subsequently attempt to dereference that pointer, you introduce undefined behaviour into your program. With undefined behaviour you have no way of knowing what will happen: the program may work; the program may crash; the program may wipe the user's hard-drive. Anything can happen when you introduce undefined behaviour into a program.


How does the highvalue function in Excel work?

Excel does not have a HIGHVALUE function. It does have a MAX function that finds the largest number in a range.The MAX function returns the largest value from the numbers provided.MAX(number1,number2,...number_n)number1, number2, ... number_n are numeric values - they can be numbers, named ranges, arrays, or references to numbers. There can be up to 30 values entered.


What is the meaning of fabs in quadratic equation in c program?

In the C Programming Language, the fabs function returns the absolute value of a floating-point number


What is the difference between min and max function?

The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)


What is a function in VB.net?

A function is an algorithm that returns a value when it is executed


A function prime that returns if its argument is a prime no or returns zero?

prime number