min

Overview :

This function is used to get the minimum value of 2 number.

Syntax :
int min(int a,int b);
Description :

The "min" function accepts 2 parameters

  • a -> This is the first number.

  • b -> This is the second number.


"min" function return min value.
Example :
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>

void main()
{
  int a=10,b=20,c;
  clrscr();
  c = min(a,b);
  printf("Smaller value is : %d",c);
  getch();
}
/* OUTPUT

Smaller value is : 10

*/

Comments

comments powered by Disqus