Updated: April 19, 2023 |
Return the lesser of two numbers
#include <stdlib.h> #define min(a,b) …
The min() macro returns the lesser of two values.
#include <stdio.h> #include <stdlib.h> int main( void ) { int a; a = min( 1, 10 ); printf( "The value is: %d\n", a ); return EXIT_SUCCESS; }
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |