Mega Code Archive
Categories
/
C
/
Code Snippets
Define inline function
#include
inline int max(int j, int k) { return j > k ? j : k; } int main(void) { int x = 5, y = 10; printf("Max of %d and %d is: %d\n", x, y, max(x, y)); return 0; }