Home > Back-end >  Pointer to an integer output in reverse chronological order
Pointer to an integer output in reverse chronological order

Time:10-14

The for loop below inv function declarations, is what meaning, please answer

CodePudding user response:

P=x
Q=x + n - 1
While (p CodePudding user response:

1/f, reference and 蘤 old crepe response:
p=x
Q=x + n - 1
While (p

The for loop is exchanged position, but they are actually compared the address where the numerical size, so understand?

CodePudding user response:

refer to the second floor weixin_46360087 response:
Quote: refer to 1st floor and 蘤 old crepe reply:
p=x
Q=x + n - 1
While (p

The for loop is exchanged position, but they are actually compared the address where the numerical size, so understand?


Compare the address, see if p is in front of the q, prevent over run

CodePudding user response:

P=x//to the address of the first element array
Q=x + n - 1//to the last element of array address
P++ forward is to address a unit, q, the address back one unit, so p* p=xx, * q=xx is the exchange of array elements

CodePudding user response:

First, exchange, the address in the back of the brackets the value exchange, this loop,,
The first cycle
P=a [0], q=a [9]
The second
P=[1], a q=a [10]
The third time
P=a [2], q=a [11]
How to understand the qq address?

CodePudding user response:

reference 4 floor qybao response:
p=x//to the address of the first element array
Q=x + n - 1//to the last element of array address
P++ forward is to address a unit, q, the address back one unit, so p* p=xx, * q=xx is the exchange of array element

The third cycle
P=2, q=11, how do you understand this 11?

CodePudding user response:

Q how can is 11?
Initially q for a [9] address, q - is a [8] address, again q - is a [7] address, an so on

CodePudding user response:

As for + + and - the difference between, since you know p++ into a [2], it must q++ will become a [10], then send me q - what is it?

CodePudding user response:

refer to the eighth floor qybao response:
as to + + and - difference, since you know p++ into a [2], it must q++ will become a [10], then send me q - what is it?

OMG, I need quiet, thank you very much, I already understand this problem is the

CodePudding user response:

Understand, this problem, thank you
  • Related