![]()  | 
![]()  | 
![]()  | 
![]()  | 
Return the greater of two numbers
#include <stdlib.h> #define max(a,b) …
The max() function returns the greater of two values.
![]()  | 
The max() function is for C programs only. For C++ programs, use the __max() macro. | 
#include <stdio.h>
#include <stdlib.h>
int main( void )
{
    int a;
    a = max( 1, 10 );
    printf( "The value is: %d\n", a );
    return EXIT_SUCCESS;
}
| Safety: | |
|---|---|
| Cancellation point | No | 
| Interrupt handler | Yes | 
| Signal handler | Yes | 
| Thread | Yes | 
![]()  | 
![]()  | 
![]()  | 
![]()  |