Multiple choice technology programming languages

11.) How can I tell how much memory my system has?

  1. a) Use getmemory()

  2. b) Use sysctl()

  3. c) Use freemem()

  4. d) Use malloc()

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

On Unix-like systems (such as BSD and macOS), the sysctl() system call or command is used to retrieve system hardware and kernel configuration parameters, including the total physical memory.