Electronics and Communication Engineering - Microprocessors - Discussion

Discussion Forum : Microprocessors - Section 1 (Q.No. 41)
41.
If A = 20 and B = - 7 in PASCAL, A mod B =
6
2
- 1
3
Answer: Option
Explanation:

It gives remainder in division operation.

Discussion:
6 comments Page 1 of 1.

Madhu said:   2 years ago
First, we need to find the quotient of A divided by B:
A div B = -2 (integer division)

Next, we can calculate the remainder of A divided by B using the formula:
A mod B = A - (A div B) * B
A mod B = 20 - (-2) * (-7) (substitute the values of A, B, and A div B)
A mod B = 20 - 14.
A mod B = 6.

Sindhu chowdary said:   7 years ago
How? Explain the answer, please.

Ajay said:   8 years ago
7 *2=14 and remainder is 6.

Rohul Amin said:   8 years ago
20/7 = 2, and the reminder is 6.
(1)

G.nirmala said:   9 years ago
How? explain the answer, please.

Jayanthi said:   9 years ago
How? Explain the answer.

Post your comments here:

Your comments will be displayed after verification.