Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Program Discussion :: Basics

Home > Programs > Basics

5 / 265

Define a macro which gives greatest number out of 3 numbers.



#define Largest(a,b,c)((a>b)?((a>c)?a:c):((b>c)?b:c))

int main()
   int a,b,c,largest;
   printf("Enter 3 numbers: ");
   printf("\nLargest of the 3 numbers: %d",largest);
   return 0;

Asked In :: Global Edge

Post Your Answer Here:


Post Your Reply Here: