Is passing global variables to functions problematic?
<p>Consider following function declaration:</p>

<pre><code>int abmeld(char *strsend)
</code></pre>

<p>which is called like this</p>

<pre><code>abmeld(str);
</code></pre>

<p>where <strong>str</strong> is a global variable declared and initialised at the start of the program file (after the includes) like this:</p>

<pre><code>char str[300] = "";
</code></pre>

<p>Now I already know this is unnecessary code (you can access and modify the char array from within any function without passing it anyways), but is this actually otherwise problematic? </p>

<p>Are there consequences (like hard error possibilities, or undefined behavior) that can happen as the result of passing an already globally scoped variable to a function?</p>