char* p=(char*)malloc(10);
in the above state ment,has the memory been initialised??...what is the difference between allocatingg it and initialising it??
thanks in avdance...
IndianaRonaldo
-3
Light Poster
Recommended Answers
Jump to PostQuote 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.'
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.