title: Are there idiomatic best practices for modifying structs in C?
body: <p>Let's say you want to make a function <code>f</code> in C that transforms some struct, say <code>struct s1</code>.</p>
  
  <p>Are there best practices/idioms in modern C over whether it is better for your function <code>f</code> to receive/return <strong>copies</strong> of the struct vs. <strong>pointers</strong> to the struct?</p>
  
  <p>For example, here are some possible type signatures for <code>f</code> (and I'm sure there's more that I'm missing):</p>
  
  <pre><code>struct s1 f(struct s1)
  struct* s1 f(struct* s1)
  void f(struct *s1)
  </code></pre>
  
  <p>In general, do people try to steer away from some of these type signatures vs others?</p>