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
What is main return c?
Why is c called "mother" language?
write a proram to reverse the string using switch case?
difference between Low, Middle, High Level languages in c ?
pierrot's divisor program using c or c++ code
What is main () in c language?
What is register variable in c language?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
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.
What are the applications of c language?
What is pre-emptive data structure and explain it with example?
Why use int main instead of void main?
What is && in c programming?
Differentiate between a for loop and a while loop? What are it uses?
What is data structure in c and its types?