user45567: Can someone interpret the code in the Title line for me?  Specifically the function of the "%" sign?  It is a line having to do with a 100 element circular buffer.

user28569: In C the % symbol is the modulo operator : https://en.m.wikipedia.org/wiki/Modulo_operation

user45571: The % is the modulo operator in C/C++, which basically means:

Divide the value to the left of the % by the value to the right of it
Discard the quotient and keep only the remainder.

For instance, 10 % 5 = 0, because 10/5 = 2 with no remainder. Whereas 11 % 5 = 1, because the remainder of the division is 1.
In your case, the modulo operator is likely being used to keep the value of put_index less than 100 at all times. If it became 100 because of the operation put_index = put_index + 1, then the modulo operation would make the 100 into 0, so put_index will keep incrementing 0–99 repeatedly.

45567: <p>Can someone interpret the code in the Title line for me?  Specifically the function of the "%" sign?  It is a line having to do with a 100 element circular buffer.</p>
 28569: <p>In C the % symbol is the modulo operator : <a href="https://en.m.wikipedia.org/wiki/Modulo_operation" rel="nofollow noreferrer">https://en.m.wikipedia.org/wiki/Modulo_operation</a></p>
 45571: <p>The <code>%</code> is the modulo operator in C/C++, which basically means:</p>

<ol>
<li>Divide the value to the left of the <code>%</code> by the value to the right of it</li>
<li>Discard the quotient and keep only the remainder.</li>
</ol>

<p>For instance, <code>10 % 5 = 0</code>, because 10/5 = 2 with no remainder. Whereas <code>11 % 5 = 1</code>, because the remainder of the division is 1.</p>

<p>In your case, the modulo operator is likely being used to keep the value of <code>put_index</code> less than 100 at all times. If it became 100 because of the operation <code>put_index = put_index + 1</code>, then the modulo operation would make the 100 into 0, so <code>put_index</code> will keep incrementing 0–99 repeatedly.</p>
