int d[3] = { a / 100 % 10, a / 10 % 10, a % 10}; 

Closed due to the fact that off-topic participants Kromster , Olter , Vladyslav Matviienko , Regent , Vladimir Martyanov 7 Sep '15 at 9:49 .

  • Most likely, this question does not correspond to the subject of Stack Overflow in Russian, according to the rules described in the certificate .
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 2
    You have already been answered 2 times, I will try to formulate it again. This string creates an array of 32-bit integers of 3 elements, initialized with three lower digits of the number a . - avp
  • 2
    ... for the case of a positive a (or zero), and three lower digits, with a minus sign, for a negative. - VladD
  • five
    I vote for the closure of this issue as not relevant to the topic, because in its current form it is useless to anyone else - Kromster

2 answers 2

a% b - the remainder of the division , the so-called operation mod

int d [3] = {5,6,7}; We set an array of three elements: 5,6,7.

Suppose a = 345, then

  • a / 100% 10 = 3
  • a / 10% 10 = 4
  • a% 10 = 5

Those. we split our number into numbers, and write them into an array.

    Most likely this is an array that contains the digits that make up the number a. In this case, should be three-digit. In general, it contains the last three digits in the number a. For example, for a = 458 the array would be: {4, 5, 8}. For a = 4567 the array will be like this: {5, 6, 7}