Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
div
eof
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

__max

Returns the larger of two values.

type __max(
   type a,
   type b 
);

type

Any numeric data type.

a, b

Values of any numeric type to be compared.

__max returns the larger of its arguments.

The __max macro compares two values and returns the value of the larger one. The arguments can be of any numeric data type, signed or unsigned. Both arguments and the return value must be of the same data type.

Routine

Required header

__max

<stdlib.h>

For more information, see the example for __min.

Community Additions

ADD
Show:
© 2015 Microsoft