Computer Science, asked by ankuryaduvanshi21, 11 months ago

int C = (3<4) ? 3*4: 3+4​

Answers

Answered by shubhambpareek
0

Answer:

12. because it is in true part

Answered by Anonymous
2

Answer:

12

Explanation:

? : is the symbol of ternary operator or conditional operator.it is used as an alternative to if-else or switch case.

syntax:

variable=(condition)?true part:false part:

few examples:

int c=(9<7)?2:1 ;

System.out.print(c);

#1 [as the condition is false]

similarly,

similarly,now your question,

int C=(3<4)?3*4:3+4;

so,here as the condition is true so,C will be assigned the value of 12. (3*4)

Similar questions