Call Support +91-85588-96644
TCYonline

Login

Sign Up

Please enter a Username or Email ID
Please enter a password
Keep me logged in
Please enter your name
Please enter your mobile number
You can't leave Captcha Code empty
By submitting this form, you agree to the Terms & Privacy Policy.
OR

Sign Up via Facebook

Sign Up via Google

Sign Up via Twitter

Download Software
Tests given

Download TCY App

App Image

What will be the values of i and j after execution?
{
int i, j, k;
j=5;
i = 2 * j/2 ; }

 
i = 5, j = 4
i = 4, j = 4
i = 5, j = 2.5
i = 4, j = 5

Reply


Please type your answer before submitting.
Submit

All answers are wrong. Because j will be 5 only. i will become 5 as * and / have equal precedence in java. So by calculation it will become 2 * 5/2 which will become 10/2 that will lead to 5

How k =4?