Home > Back-end >  C language malloc
C language malloc

Time:06-03

Bosses, use malloc for ten int address, why after the tenth still have the address?

CodePudding user response:

First, you need to understand that the address is consistent, whether you use useless, as if the hard disk is ok for you, don't pull down, there he was, this is the computer's make good when producing, as for you to carry out the malloc and other statements, you just tell the computer, this paragraph of memory you are using, and then make a pointer to a memory address, and then you can be operated by the pointer
Operations, such as
For example, now have the technology of data recovery, the principle is the basis of using the computer will not delete the information actively, will only sentence with useless, useful as a tag,
So when writing the list need to pay attention to security issues such as memory leaks,

CodePudding user response:

Is not consistent

CodePudding user response:

A + I just an addition
And the same 1 + 1

CodePudding user response:

C language does not check whether the array subscript crossing the line,

CodePudding user response:

refer to 1st floor @ contradict response:
the first thing you need to understand that the address is consistent, whether you use useless, as if the hard disk is ok for you, don't pull down, there he was, this is the computer's make good when producing, as for you to carry out the malloc and other statements, you just tell the computer, this paragraph of memory you are using, and then make a pointer to a memory address, and then you can be operated by the pointer
Operations, such as
For example, now have the technology of data recovery, the principle is the basis of using the computer will not delete the information actively, will only sentence with useless, useful as a tag,
So when writing the list need to pay attention to security issues such as memory leaks,

Thank you for your bosses to solve, thank you very much, thank you

CodePudding user response:

Many glass house street, were built early, because is glass, can see what is in it.
Local tyrants, you spend money to buy a 10 for developers building, housing developers give you 10, announced the 10 house belong to you, and change things.
11 with or without a house, you can see what's inside.
In fact don't house 11 this also can see, as long as you know where your 10 building, next to go to find. But if you don't belong to your house in the what's inside is breaking the law (program might be wrong)

CodePudding user response:

refer to 6th floor libralibra response:
a lot of glass house street, were built early, because is glass, can see what is in it.
Local tyrants, you spend money to buy a 10 for developers building, housing developers give you 10, announced the 10 house belong to you, and change things.
11 with or without a house, you can see what's inside.
In fact don't house 11 this also can see, as long as you know where your 10 building, next to go to find. But if you don't belong to your house in the what's inside is breaking the law (program might be wrong)

Thank you big brother (? 'omega `?) Read, you will understand, I'm such a rookie hope to have you such a big help, thank you very much

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related