Basic and Advance C Question:

How can I find out how much memory is available?

Tweet Share WhatsApp

Answer:

Your operating system may provide a routine which returns this information, but it's quite system-dependent. (Also, the number may vary over time.) If you're trying to predict whether you'll be able to allocate a certain amount of memory, just try it--call malloc (requesting that amount) and check the return value.

Download C Programming PDF Read All 221 C Programming Questions
Previous QuestionNext Question
How can I allocate arrays or structures bigger than 64K?How do I create a directory? How do I remove a directory (and its contents)?