title: multiple definition of a const int
body: <p>I have a header file <code>A.h</code> in which i define a <code>const int ID = 4;</code>. I have included this header file in to C files <code>A.c</code> and <code>main.c</code>. I have used header guards <code>#ifndef A_H #define   A_H</code> etc. But I get the error <code>multiple definition of ID</code> when I try to compile the code.
  I read somewhere that this can, in most cases, be avoided by using <code>#pragma once</code> but I still get the error.
  My question is that how can I define variables in C? Should I have to move definition of ID to C file but then I have to declare it in every file I use? Or using <code>extern</code> the only way in this situation?</p>