[Solved] Why when I print it appears 80 for *str in decimal (letter P in ASCII)?

[ad_1]

Your last print says to print the character pointed to by str as a decimal, which is exactly what it did (for a memory location you just deallocated, making this undefined behavior).

3

[ad_2]

solved Why when I print it appears 80 for *str in decimal (letter P in ASCII)?