How can you find out how much memory is available?



How can you find out how much memory is available?..

Answer / Sudhanshu Mishra

In C, there isn't a built-in function to get the exact amount of free memory. However, you can use platform-specific APIs or third-party libraries like malloc_usable() from the Valgrind tool.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Is it cc or c in a letter?

1 Answers  


How do you prevent buffer overflows in C?

2 Answers  


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1 Answers  


What is scanf () in c?

1 Answers  


Difference between MAC vs. IP Addressing

1 Answers  


What is FIFO?

4 Answers  


Why c is faster than c++?

1 Answers  


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

1 Answers   Infosys,


What is static and volatile in c?

1 Answers  


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

1 Answers  


Describe the header file and its usage in c programming?

1 Answers  


a<<1 is equivalent to a) multiplying by 2 b) dividing by 2 c) adding 2 d)none of the above

2 Answers   HCL, NBN,


Categories