Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining


Returns the larger of two values.

type __max(
   type a,
   type b 


Any numeric data type.
a, b
Values of any numeric type to be compared.

Return Value

__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 Compatibility
__max <stdlib.h> Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.


All versions of the C run-time libraries.


See the example for __min.

See Also

Floating-Point Support Routines | __min | Run-Time Routines and .NET Framework Equivalents

© 2015 Microsoft