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 pointer to pointer in c language?
Describe how arrays can be passed to a user defined function
Why #include is used in c language?
how to execute a program using if else condition and the output should enter number and the number is odd only...
What are the differences between Structures and Arrays?
What are the types of functions in c?
What is the equivalent code of the following statement in WHILE LOOP format?
How can I invoke another program or command and trap its output?
What is sizeof array in c?
What is the difference between arrays and pointers?
What is the size of structure pointer in c?
How can I find out if there are characters available for reading?
What are pointers?
What are the types of bitwise operator?
What does printf does?