Giving a=10, b=2.5, c=6; what will be the output of 1° int m= a-b*c; 2° char k= (a%2==0?'P','R'); 3°float p=5+c/a; | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Giving a=10, b=2.5, c=6; what will be the output of 1° int m= a-b*c; 2° char k= (a%2==0?'P','R'); 3°float p=5+c/a;

what is the output of this?

20th Mar 2017, 4:12 PM
Stherdo Wss
Stherdo Wss - avatar
1 Answer
+ 1
1. m=a-b*c = 10 - 2.5 * 6 = 10 - 12 = -2 2. char k= (a%2==0?'P','R'); =(10%2==0?'P':'R') ='P' 3. float p=5+c/a =5+2.5/10 =5+0.25 =5.25
20th Mar 2017, 4:52 PM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar