answersLogoWhite

0

#define MIN(x,y) ((x<y)?x:y)

#define MAX(x,y) ((x>y)?x:y)

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is java statement to find the maximum between two values?

You can use one of the Math.max() methods, or the ternary operator, that is, one of the following: Math.max(a, b) a &gt; b ? a : b


How do you find the greatest of three numbers using ternery operator?

Compare the first two numbers with the ternary operator. Store the result in a temporary variable. Compare the temporary variable with the third number, again using the ternary operator.


What is condional operator?

Conditional Operator- Its the only ternary operator in c/c++.- Its syntax is-(condition)?statement1:statement2;-Shruti Jain


How do you write a algorithm for finding maximum of 2 numbers in c?

You can use the ternary operator, in an expression such as: result = a &gt; b ? a : b; This is equivalent to: if (a &gt; b) result = a; else result = b;


What is the name of the expression that is formed by using logical operators?

Ternary operator


How can you download c compiler?

write a c program to fine largest/smallest of 3no (using ?:ternary operator/conditional operator)


Which c plus plus operators cannot be overloaded?

1. Member-of operator (.) 2. Pointer-to-member-of operator (.*) 3. Ternary condition operator (?:) 4. Scope resolution operator (::) 5. sizeof operator 6. typeid operator


What is the conditional operators in c language?

The conditional operator is also known as ternary operator. It is called ternary operator because it takes three arguments. The conditional operator evaluates an expression returning a value if that expression is true and different one if the expression is evaluated as false.Syntax:condition ? result1 : result2If the condition is true, result1 is returned else result2 is returned.


What is the algorithm for determining the maximum of two numbers?

Compare two numbers, a and b. If a is greater than b then return a, otherwise return b. In C, we can implement this algorithm using the ternary operator (?:), as follows: return a&gt;b?a:b;


What are special operators in c plus plus?

The only "special" operators in C++ are those that cannot be overloaded. That is; the dot member operator (.), pointer to member operator (.*), ternary conditional operator (:?), scope resolution operator (::), sizeof() and typeof().


What is ternery oparetor?

A ternary operator takes 3 operands. The only one I can think of in C# or C is the"? :" operator: ? : For example:Console.Write(1==2 ? "Huh?" : "Impossible"); //Impossible is printed


Enumerate the types of selection constructs in c plus plus?

Selection constructs in C++if...elseswitch/caseconditional ternary operator (?:)