Computer Science, asked by skysweetwini3194, 7 months ago

Char z = ‘a’; int var = (z = = ‘a’) ? ‘a’ : ‘a’;
system.out.println("var = " + var);

Answers

Answered by BrainlyProgrammer
2

Answer:

OUTPUT:

var = 97

Answered by anindyaadhikari13
1

Question:-

Find the output of the following code.

Solution:-

Given code,

char z='a';

int var=(z=='a')?'a':'a';

System.out.println("var = "+var);

Here,

z=='a' is true.

So,

var='a'.

ASCII value of a is 97.

So,

var = 97

Output:-

var = 97.

Similar questions