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
How can I get back to the interactive keyboard if stdin is redirected?
What is the use of header files?
Is there sort function in c?
What is the difference between memcpy and memmove?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
How old is c programming language?
Is linux written in c?
What is difference between array and structure in c?
Can you write the function prototype, definition and mention the other requirements.
What are the types of c language?
What are the types of bitwise operator?
Explain the difference between ++u and u++?
What is the scope of global variable in c?