3
Contributors
3
Replies
6
Views
6 Years
Discussion Span
Last Post by IndianaRonaldo
0

Quote from cpp reference:

'Allocates a block of size bytes of memory, returning a pointer to the beginning of the block.

The content of the newly allocated block of memory is not initialized, remaining with indeterminate values.'

0

1. Allocation means to create space for your application use
2. Initialize means to assign specific values to that space

Using malloc creates space, but contents of space undefined

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.