Use macro to find the minor variable
#include <stdio.h> #define min(a, b) ((a<b) ? a : b ) int main() { int a,b,c; a = 1; b = 2; c = min ( a, b); printf ( "a: %d, b: %d, c: %d\n", a, b, c ); }