max

Overview :

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

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

The "max" function accepts 2 parameters

  • a -> This is the first number.

  • b -> This is the second number.



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

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

Larger value is : 20

*/

Comments

comments powered by Disqus