answersLogoWhite

0

in some special cases it is possible

in: if (cond) var= exp1; else var= exp2;
out: var= cond? exp1: exp2;

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How can you download c compiler?

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


How do you write a c program to find biggest among two numbers using conditional operator?

int max (int a, int b) { return a>b?a:b; }


Make a sentences with pasy unreal conditional?

Pasy is an unreal word, that is conditional on not using it as a proper noun.


What is a sentence using the word conditional?

The judge issued a conditional pardon, all terms must be met before the defendant is released.


Which operator not overloaded in c plus plus?

The if statementex.if (index < 5)printf("Index is less than 5\n");elseprintf("index is greater or equal to 5\n");(You can also replace the "if" with a "?" and the "else" with a "?" -- no, that would be syntax error)


How pointer is declared using address operator?

int *ptr; PS: I don't know what do you mean by 'using address operator'


Is there any solved problems using De Morgan's laws?

The rules can be expressed in English as:The negation of a conjunction is the disjunction of the negations.The negation of a disjunction is the conjunction of the negations.The rules can be expressed in formal-languagewith two propositions P and Q as:where:&not; is the negation operator (NOT)is the conjunction operator (AND)is the disjunction operator (OR)&hArr; is a metalogic-1symbol meaning "can be replaced in a formal-proofwith"


What is meant by the conditional expression?

A conditional expression is a programming construct that evaluates a condition and returns one of two values based on whether the condition is true or false. In many programming languages, this is often represented using the ternary operator (e.g., condition ? value_if_true : value_if_false). It allows for concise code by combining an if-else statement into a single line, enhancing readability and efficiency in decision-making processes within the code.


What is the result of using the time operator on the keyword "keyword"?

The result of using the time operator on the keyword &quot;keyword&quot; is the current time in milliseconds when the operation was executed.


What is the program for compare two strings using conditional operator in java?

System.out.println(a.equals(b) ? "They are equal" : "They are different");System.out.println(a.equals(b) ? "They are equal" : "They are different");System.out.println(a.equals(b) ? "They are equal" : "They are different");System.out.println(a.equals(b) ? "They are equal" : "They are different");


How do you define power function without using operator?

using pow() function.. ..


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.