answersLogoWhite

0

int min (int a, int b, int c) {
if (a <= b && a <= c) return a;
if (b <= a && b <= c) return b;
return c;
}

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 a minimum function?

The minimum function is the function that takes two arguments and returns the smallest of the two. Alternatively the function can take any finite amount of arguments and return the smallest.


What is the use of void data types?

When a function declares it returns void, it means it does not return anything. Sometimes the function doesn't need to return anything, so using void is convenient. In C: using voidinstead of parameters means 'there's no parameters'


Write a function prototype named test that accepts two parameters an integer and character and returns a float?

float test(int, char);


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

A function.


What is the function of plus sign?

The "plus sign" (+) is an operator that, by default, takes the left and right operands as parameters, and returns the sum of both operands as the return value.


How is a system call initiated?

A system call is initiated when a program requests a service from the operating system's kernel. This typically occurs through a specific instruction or API function that switches the execution context from user mode to kernel mode. The program specifies the desired service by passing parameters, often using registers or a stack. The kernel then processes the request and returns the result to the user program.


What is base of stack segment?

The base of the stack segment refers to the starting address of the stack in a program's memory. It is the location where the stack begins, and as data is pushed onto the stack, the stack grows downward in memory. This segment typically holds local variables, function parameters, and return addresses, and its management is crucial for function calls and returns in a program's execution. In many architectures, the stack grows towards lower memory addresses.


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 .


How can I use the scipy differentiation function to calculate the derivative of a mathematical function?

To calculate the derivative of a mathematical function using the scipy differentiation function, you can use the scipy.misc.derivative function. This function takes the mathematical function, the point at which you want to calculate the derivative, and the order of the derivative as input parameters. It then returns the numerical value of the derivative at that point.


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.