title: What does #QNANO signify or mean in C?
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;math.h&gt;
  
  int n;
  
  struct vector
  {
    int dir[100];
  };
  int dot(struct vector v1, struct vector v2)
  {
    int dp,j;
    dp=0;
    for(j=0;j&lt;n;j++)
    {
      dp = dp + (v1.dir[j]*v2.dir[j]);
    }
  return dp;
  }
  float cosine(int vdot, float v1mod, float v2mod)
  {
    float cos1, vdo = vdot;
    cos1 = (vdot/(v1mod*v2mod));
    return cos1;
  }
    float modul(struct vector v1)
  {
    int j;
    float v1mod;
    float deg = 0;
    for(j=0; j&lt;n; j++)
     {
       deg = deg + ((v1.dir[j])*(v1.dir[j]));
     }
   v1mod = sqrt(deg);
  }
  int main()
    {
      int j;
      scanf("%d", &amp;n);
      struct vector v1;
      struct vector v2;
      for(j=0;j&lt;n;j++)
        {
           scanf("%d", &amp;v1.dir[j]);
        }
      for(j=0;j&lt;n;j++)
        {
           printf("%d/", v1.dir[j]);
        }
      printf("\n");
  
      for(j=0;j&lt;n;j++)
        {
           scanf("%d", &amp;v2.dir[j]);
        }
      for(j=0;j&lt;n;j++)
        {
           printf("%d/", v2.dir[j]);
        }
           printf("\n");
  
      int vdot;
  
      float v1mod, v2mod, cos2;
  
      vdot = dot(v1,v2);
      printf("%d\n", vdot);
  
      v1mod = modul(v1);
      printf("%f\n", v1mod);
  
      v2mod = modul(v2);
      printf("%f\n", v2mod);
  
      cos2 = cosine(vdot, v1mod, v2mod);
  
      printf("cosine = %f\n", cos2);
    }
  </code></pre>
  
  <p>When we compile the code, the output for cosine is showing "1.#QNANO.
  I checked all the websites, but no where did I find the right reason for the occurrence of the
  error.
  Also can some one specify how many such more error types are there . 
  **The bug in the code is intentional.</p>