Zero. The pointer given to free() is not in its list of allocated blocks. Usually, free does not check for blocks that are inside the block that it knows is allocated; the pointer must match exactly what was given by malloc().
Both answers are accurate, but Banfa's answer is the correct one. Nutster's answer is true in the majority of implementations, but not all, and according to the standard the behavior is implementation dependent. You cannot count on any specific result without knowing the implementation in question.
As one famous quip on the subject went: 'undefined behavior' means that the program can, for example, cause demons to fly out of your nose if that happens to be the way it was implemented.
Note that this is not the same as random behavior; the implementation is generally still going to be deterministic, with a given implementation consistently giving the same results. You simply cannot anticipate the behavior from the standard. A consistent behavior on a given compiler, or even several compilers with similar implementations, does not change the fact that it is undefined by the standard.
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"