title: How to execute a terminal command in C?
body: <p>I'm writing a program in C. I want to get the current hour,minute, second, and nanosecond in the form of H:M:S:3N. Basically. <code>echo &quot;$(date +' %H:%M:%S:%3N')&quot; </code> command does what I want. How can I execute it in my C code and print the result?</p>
  <p>Any help is appreciated!</p>