title: the program, receiving an integer (as a string), after converting the data type perceives it as a string
body: <p>The program receives the data, but treats the string (&quot;20x&quot;) as an integer.(This is not my code, I found it on the internet.)</p>
  <pre><code>// C program to find data type
  #include &lt;math.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  # define MAX_INPUT 100
    
  int main()
  {
      // To read input
      char value[MAX_INPUT] = &quot;&quot;;
    
      // To store numeric value of input if a 
      // number (float or integer)
      double temp;
    
      // To store integral value of input
      int n;
    
      // To store string value of input
      char str[MAX_INPUT] = &quot;&quot;;
    
      // Precision for integer checking
      double val = 1e-12;
    
      fgets(value, 100, stdin); // Read input
    
      // Check for integers.
      if (sscanf(value, &quot;%lf&quot;, &amp;temp) == 1) 
      {
          n = (int)temp; // typecast to int.
          if (fabs(temp - n) / temp &gt; val) 
              printf(&quot;The input is a floating point\n&quot;);        
          else 
              printf(&quot;The input is an integer\n&quot;);        
      }
    
      // Check for string 
      else if (sscanf(value, &quot;%s&quot;, str) == 1)     
          printf(&quot;The input is a string\n&quot;);
        
      else // No match.    
          printf(&quot;input not recognized\n&quot;);    
  }
  </code></pre>
  <p>So, If we enter &quot;20x&quot; for example, we will get a message &quot;The input is an integer&quot;.
  I tried changing datatypes and array values, but it still didn't work as it should. Maybe it's a bug of this language.
  Thank you.</p>