Computer Science, asked by harshir79, 3 months ago

d) Identify the error in the following snippet and correct it

String res=if(mark>40 && mark<=100)?pass:fail;

[2]​

Answers

Answered by BrainlyProgrammer
1

Answer:

Since it is the ternary operator........

Correct answer is

String res=(mark>40 && mark<=100)?pass:fail;

Similar questions