Write the output of the given snippet. please??
Attachments:
Answers
Answered by
2
Answer:
Output of the given snippet is:
97
Answered by
4
Question:-
- Write the output of the following code snippet.
Solution:-
Given code,
char x='A';
int m;
m=(x=='a')?'A':'a';
System.out.println("m = "+m);
Since, x=='a' returns false, so,
m='a'
ASCII value of small a is 97
So,
Output:-
m = 97
Output:-
m=97
Similar questions