Find greatest of two numbers using macro

Answer Posted / banavathvishnu

#include<stdio.h>
#include<conio.h>

#define Greatest(X,Y) X>Y?X:Y

int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%d",Greatest(x,y));
getch();
}

Is This Answer Correct ?    91 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is main return c?

519


Why is c called "mother" language?

857


write a proram to reverse the string using switch case?

2469


difference between Low, Middle, High Level languages in c ?

1634


pierrot's divisor program using c or c++ code

1732






What is main () in c language?

597


What is register variable in c language?

605


What is the difference between declaring a variable by constant keyword and #define ing that variable?

2699


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

14964


What are the applications of c language?

626


What is pre-emptive data structure and explain it with example?

3210


Why use int main instead of void main?

599


What is && in c programming?

683


Differentiate between a for loop and a while loop? What are it uses?

675


What is data structure in c and its types?

596