__min
Visual Studio 2005
Returns the smaller of two values.
type __min(
type a,
type b
);
Parameters
- type
-
Any numeric data type.
- a, b
-
Values of any numeric type to be compared.
// crt_minmax.c
#include <stdlib.h>
#include <stdio.h>
int main( void )
{
int a = 10;
int b = 21;
printf( "The larger of %d and %d is %d\n", a, b, __max( a, b ) );
printf( "The smaller of %d and %d is %d\n", a, b, __min( a, b ) );
}
Output
The larger of 10 and 21 is 21 The smaller of 10 and 21 is 10