Variable usage in C : <p>I'm a novice in C and came across code that seemed peculiar to me,</p>

<pre><code>extern int num;
int counter;

void init_counter() {
    counter = 0;
}

int return_position() {
    int pos = counter;
    counter = counter * num;
    return pos;
}
</code></pre>

<p>What is the point of the pos variable?
why can't I just do:</p>

<pre><code>extern int num;
int counter;

void init_counter() {
    counter = 0;
}

int return_position() {
    counter = counter * num;
    return counter;
}
</code></pre>

<p>any help is appreciated</p>
