What will be the value of the following, if j=5 initially?
a) ( ( ++j + 5) + j ) % 6
b) ( j++ + 5 ) /2 + 10
please answer and explain clearly
Answers
Answered by
1
Here is the Answer With Explanation:
Explanation:
WORLD FULL OF QUESTIONS
Menu
What will be the value of following, if j=5 initially? (5* ++j)%6 (5*j++)%6
Q24. What will be the value of following, if j=5 initially?
(5* ++j)%6
(5*j++)%6
Ans.
(5* ++j)%6
initially j=5
after increment operator ++j, value of j =6
(5*j)%6
(5*6)%6
30%6
0
2. (5*j++)%6
initially j=5
after increment operator j++, after performing operation, value of j =6
(5* j++)%6
(5*5)%6
25%6
1
Answered by
1
Answer:
a. 5
b. 15
Explanation:
((6+5)+6)%6
=17%6=5
b. (5+5)/2+10=5+10=15
Similar questions
Hindi,
4 hours ago
English,
4 hours ago
CBSE BOARD X,
7 hours ago
Math,
7 hours ago
Social Sciences,
8 months ago