What will the result of num variable after execution of the following statements? int num = 68; num % = 13;
Answers
Answered by
1
Answer:
num = 3
Explanation:
Given,
int num = 68; num % = 13;
To find: What will the result of num variable after execution
Concept: Modulus(%) operator is used to store the remainder.
Solution:
int num = 68; num % = 13;
here first the num variable is initialised as 68.
and, thereafter its second statement can be written as:
num = num%13.
i.e 68%13.
On dividing 68 with 13 we will obtain 5 as quotient and 3 as Remainder.
Since, the '%' operator executes remainder therefore, num will be re-initialsed as 3.
Hence, the result of num variable after execution will be 3.
Answered by
0
Answer:
nem=3 is the write answer.
Similar questions