An array, pointer experience exchange (pile, stack discussion preliminary ...)

xiaoxiao2021-03-06  45

Once the coming) 11:02:42 is 2 * 4 3 1 (once the future) 11:03:00 I have been in front of my front offset, I should add one talent (there is no snow in paradise) 11:03 : 22 No, it's a bit chaos, huh, I am also a chaotic, huh, huh, huh, huh, huh, huh, hahaha (heaven, there is no snow) 11: 03:52 (Once the future) 11:03:56 Added a repeated minus one, actually no need to add .ash) 11:03:57 I now feel that A [2] [3] addressing mode should be: Look for a [2], which is to skip 2 int [3], then skip 3 int  in the current location, find this array and pointer to harmonious uniform (heaven without snow) 11 : 04: 03 is warm, just next class (once the future) 11:04:05 pair (once the future) 11: 04: 11ASH said is right (no snow in Heaven) 11:04:26 赞 (University C novice 11:04:32 Another cattle arrived (there is no snow in paradise) 11:05:39 (Na.ash) 11:05:46 (learn C novice) 11:07:06 How to sweat? (Learning C novice) 11:07:37 (2004-12-17 11:03:57), I feel now, A [2] [3] addressing method should be: first look for a [ 2], that is, skip 2 int [3] position, then skip 3 int 位置 in the current location, find this array and pointer to harmonious uniform ---------- ---------------- How to achieve? (Once the future) 11:08:36 is achieved? Implementation is what I wrote (learn C novice) 11:10:21 brain chaos ~~~~ Think about it again ... (N) 11: 10: 26INT A [2] [3] is int (* a) [3] is to define a pointer A. The type pointer to the pointer is a plurality of arrays of 3 int I. This time, if addressing: a [1] [2] is * (a [1] 2 ) * (* (A 1) 2), that is, jump from a forward (learn C novice) 11:12:00 From a forward jump 1 ------------- --- Wooden can understand (ergonom) 11:12:26 This jump is the type of A, because the type of A is an int array of length 3, so jump forward 1 * 3 * Sizeof (int ) However, the type of * (a 1) is also a pointer. It is an INT type pointer, so the result of * (a 1) 2 is the pointer to jump forward with 2 INT. Theash) 11:14: 03INT * a; A = 1; it is a distance that I want to jump an int width that if the type pointing is not int, but an array of int types, the number of elements of the array is 3, A = 1 is Not a distance from a array? (Learning C novice) 11:14:29 solution .... (Once the future) 11:14:33 First, you have to understand that the pointer is divided into two parts, and the operation of a pointer P, P is Move the address location it points to, the operation of * P is to operate the data it points to it (there is no snow in heaven) 11:15:12 You can talk more than the teacher, (learn C novice) 11: 15: 15INT * p) [3] p ; add int [3] (Once the future) 11:15:28 Oh, my teacher said more than me (Ni.ash) 11: 15: 43a [2] == * (A

2) Ricky yesterday, this style is really classic. (Once the future) 11:15:56 There is also that 0 [P] (once the future) 11:15:59 is too strong (Ni.ash) 11:16 : 21 points out of the pointer and the inner contact of the array (learn C novice) 11: 16: 210 [P] I can't understand (erior .ash) 11:17:04 Proof, use the addition to the law: a [2 ] == * (A 2) == * (2 a) == 2 [A] (Once the coming) 11: 17: 050 [P], is the starting point from the program memory, move to the position where the P pointer is located (Ricky) 11:17:42 (Roy .ash) 11:17:04 Proof, use the addition of addition to the law: a [2] == * (a 2) == * (2 a) == 2 [ a], this is this, (learn C newbie) 11:17:56? (Ricky) 11:18:10 The same reason, 2 can be replaced with 0, even negative, can also be greater than the array size (learn C novice) 11:18:15, although the bow (heaven has no snow) 11:18:22 Relying on, strong, I heard that I have been like this (once the future) 11:18:23 huh, so C is long-lived (Ricky) 11:18:24 As long as this size is still in the stack (heaven No snow) 11:18:33 (Na.ash) 11: 18: 41C is really too profound (Ricky) 11:18:41 will not cause a mistake. (Non-snow) 11:18:54 Learn ing (once the future) 11:19:00 Understand this, you will understand that the entire computer is in the C compiler to use pointer operating resources (ricky) 11:19: 10. That is why it is sometimes the pointer is just wrong results, but it will cause the program to crash (learn C novice) 11: 20: 042 [A] What is this time? ------------------------ I don't live ... I still don't understand (heaven is not snow) 11: 20: 31A [2] (Ricky) 11: 20: 352 [A] is equal to A [2] ah (Ricky) 11:21:01 is actually in the deception compiler, anyway, the assembly code is the same (there is no snow in heaven) 11:21: 14 is something that is the same memory block (learning C newbie) 11:22:52 .......... (once the future) 11:23:21 In fact, I don't think it can be called deceived, from mathematical meaning In the above, this conversion is perfect (once the future) 11:23:36 can support such an operation, it is complete in the mathematical perspective (meteor shower) 11:23:41 (Na.ash) 11: 23: 46C compilation When processing a [2], look the A and 2 as the same thing? Just do a simple address plus, whoever doesn't matter if you don't know if you don't know? (Once the future) 11: 24: 16a [2] is from A Offset 2,2 [A] is from 2 offset A, they should be consistent (once the future) 11: 24: 29ash said correct Ah (learning C novice) 11: 24: 43A [2] is from a offset 2, 2 [a] is from 2 offset A, they should be consistent ----------- --------- This saying is good (Ricky) 11:24:45 is very reasonable (walking for the end of the day 2) 00:51:39 (Meteor rain) 11: 24: 55A [2] is from A Offset 2, 2 [A] is from 2 offset A has never seen (there is no snow in heaven) 11:25:25 Anyway, the same place (walking for the end of the earth 2) 00:52:24 I know should go see , Corresponding assembly code (meteor rain) 11:25:38 Oh,

The message you just sent: "I know that I should go see, the corresponding assembly code" is not sent success (server timeout).

(Scholang C newcomer) 11:25:58 Say now, I think the best is the best in the future, although this concept is the Ricky is ASH (Meteor) 11:26:40 Haha, (once the future) 11 : 26:42 (Ricky) 11:17:42 (Na.ash) 11:17:04 Proof, use the addition to exchange law: a [2] == * (A 2) == * (2 a) == 2 [A], this is the truth, this proof of ASH is the most stringent (learning C newbie) 11:26:59 but can not understand (guderian ★) 11:27:40 reported to something else ( .Ash 11:27:45 I said that it is a good look of the dragon eighteen women's dance (once the future) 11:28:02 Learn the first year's function analysis, you will learn (learn C novice) 11: 28:33 Functional analysis? Wood has learned ~~~ (Ulika) 11:29:53 Is it embedded? (Learning C Novice) 11:30: 24INT A [10] A This character is not a variable pinch? A == a [-1] ???? (Meteor Shower) 11:30: 42a is a constant address

(Na.ash) 11: 31: 02A is the address (ergonomic) 11:31:18 is the pointer (meteor rain) 11:31:19 is (learn C novice) 11: 31: 20A [0]?

(Meteor Shower) 11: 31: 47A [0] The representative is an element (learn C novice) 11: 31: 57 & a [0]? (Meteor rain) 11:32:10 huh, (erior .ash) 11: 32: 16int A [10] equivalent and int * a = new [10]; a equivalent and & a [0] (ergonomic) 11:32:42 Of course, one in the stack is on a stack

(Metei rain) 11:32:42 master (learn C novice) 11:33:18 stacks and piles? Require ASH to talk about ... I haven't understood it? (Anta .ash) 11:34:02 In addition to New, other things are all built on the stack (learn C novice) 11:34:37 ​​stack I remember the first-first first? (Ulika) 11:34:48fifo, (Ricky) 11:35:05 That is the stack data structure, and this is not a concept (once the future) 11:35:19 Heap and stack here is not a data structure Stack (once the future) 11:35:24 is the management method of memory (learn C novice) 11:35:25 So I don't understand ~~~~ (Learn C novice) 11:35:35 Speaking .. .. (with .ash) 11: 35: 39fifo? Queue? (ULL) 11:35:41 Queue is the advanced existing stack is the first out! 11:35:49 Well, (learn C novice) 11:35:59 I remember (learn C) Novice 11:36:15 but still speak the system's pile and stack? (Learning C novice) 11:36:23 Do not understand ~~~~ (learn C novice) 11:36:52 Is there anything in the operating system? If you have a touch, you turn back (meteor shower) 11:37:09 Data structure Look, (ergonomic) 11:37:14 I only know that the way is probably running, not clearly clear, the specific organizational mode, the person profound Talk about the book of the operating system, at least I have seen the textbooks (learn C newbie) 11:37:29 I think there is no ... (Roman .ash) 11:37:32 In fact, the principle of compilation Compilation principle about (Ricky) 11:37:34

(Once in the future

In simple, the resource on the pile is that the resources on the stack maintained by the programmer are compiled to manage (the stack of data structure is another problem)

转载请注明原文地址:https://www.9cbs.com/read-79723.html

New Post(0)