Function returning int data type in c programming.

void main(){
int max;
max=max_value();
printf("Max of three: %d",max);
getch();
}
int max_value(){
int a=5,b=15,c=10;
int max;
max=(a>=b?a:b)>=c?(a>=b?a:b):c;
return max;
}
Output: 15
Post a Comment