Home > Back-end >  Data structure related problem please each big fast to answer
Data structure related problem please each big fast to answer

Time:03-16

Elem in array structure is not why can use cycle in assignment a elem input? [I]

CodePudding user response:

 A [B] 
* (A + B)
* (B + A)
B [A]
//the above four lines equivalent

"ABC" [1]
* (" ABC "+ 1)
* (1 + "ABC")
1 (" ABC ")
//the above four lines equivalent

A [0]
* (A)
[A] 0
//the above three lines of equivalent

CodePudding user response:

Code information is not complete, doubt is to elem application dynamic space, this can be in accordance with the array to the assignment, the form of
So, check the initialization function in whether have applied for space for elem,

If no application can also such assignment, so even if possible it is random, because the use of wild pointer is undefined behavior
  • Related