What is the output of the following program snippet: [2]
char k=‟D‟;
int a=16; float b=29.78;
System.out.println((int)k+a);
System.out.println(“The ans=”+a+b);
plese provide me the answer as soon as possible
Answers
Answered by
0
Answer:
84
The ans 45.78
Explanation:
Use the ascii code for D and which is 68 and then add with a which is 16. So 68+16 = 84.
Similar questions