Hi,

I have 2 questions regarding macros..

Problem 1:

I have to write a program to find greatest of 3 numbers and add greatest number to smallest one.I have done as follow:

I am able to get the greatest number but not able to add with smallest.Code:#include<stdio.h> #include<stdlib.h> #define MAX(a,b,c) ((a>b && a>c)?a:0 || (b>a && b>c)?b:0 || (c>a && c>b)?c:0); int main() { int x,y,z; int temp; temp= MAX(44,57,600); printf("%d",temp); getchar(); }

Problem 2:

Can any body tell me how to return string from a macro ?

Is it possible or macro always return integer or float values?

I have searched but didn't get any code related to that...

Thanks