+ 1
Question and solution
Question : System.out.print((int'A'+10)/19); Is solution true ????????????????????????? Solution : Int char= 32 (1+32+32+10)/19=3.9 Because it's not double: output is 3
11 Answers
+ 5
MIlad Khan understand that (int)'A' evaluates to the value 65, which is the ASCII code for 'A'.
((int)'A' +10)/19 =
(65 + 10)/19 = (75)/19 = 3 //integer math
+ 4
When dividing an integer by an integer, the result will be an integer.
If you want to get a real number, then you need to convert one of the numbers to a real number, for example like this:
System.out.print(((int)'A'+10)/19.);
+ 3
In Java int divide by int always returns int
+ 2
System.out.print((int)'A' + 10) / 19);
Check this : )
+ 1
I checked that's output 3
0
Please explain more
0
Bro if I do 19/10 that's 1 but the output will get 3.
0
MIlad Khan I don't understand anything.
What does 19/10 have to do with it?
Are you not satisfied with my answer?
Have you looked at the result of my example?
If you want to contact someone personally, click @ and select the desired user from the list that opens.
0
Brian , finally , I received complete answer that value 65 you told
0
The difference Html with C++ is that C++ is used for System machines and computer and mobile but HTML only using for creating root and structure of website,
0
Oh