Computer Applications
if(a<b)
c = a;
else
c = b;
It can be written as:
- c = (b<a) ? a:b;
- c = (a!=b) ? a:b;
- c = (a<b) ? b:a;
- none
Java Conditional Stmts
15 Likes
Answer
none
Reason — Its correct representation using ternary operator is c = (a<b) ? a : b
Answered By
8 Likes
Related Questions
A compound statement can be stated as:
- p = in.nextInt();
q = in.nextInt(); - m =+ + a;
n =— b; - if(a > b)
{ a++; b--;} - none
- p = in.nextInt();
If((p>q) && (q>r)) then
- q is the smallest number
- q is the greatest number
- p is the greatest number
- none
If(a < b && a < c)
- a is the greatest number
- a is the smallest number
- b is the greatest number
- none (where a, b and c are three integer numbers)
State whether the following statement is True or False :
if statement is also called as a conditional statement.