title: function doesn't return long long int
body: <p>I don't know why my function doesn't give the correct result. I suspect that it doesn't return the right type (unsigned long long int), but it return an int instead.</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  
  // compile with:
  //         gcc prog_long_long.c -o prog_long_long.exe
  // run with:
  //         prog_long_long
  
  unsigned long long int dec2bin(unsigned long long int);
  
  int main() {
      unsigned long long int d, result;
  
      printf("Enter an Integer\n");
  
      scanf("%llu", &amp;d);
  
      result = dec2bin(d);
  
      printf("The number in binary is %llu\n", result);
  
      system("pause");
  
      return 0;
  }
  
  unsigned long long int dec2bin(unsigned long long int n) {
      unsigned long long int rem;
      unsigned long long int bin = 0;
      int i = 1;
      while (n != 0) {
          rem = n % 2;
          n = n / 2;
          bin = bin + (rem * i);
          i = i * 10;
      }
      return bin;
  }
  </code></pre>
  
  <p>Here is the output of the result with different input values:</p>
  
  <pre><code>C:\Users\desktop\Desktop\gcc prog_long_long.c -o prog_long_long.exe
  
  C:\Users\desktop\Desktop\prog_long_long
  Enter an Integer
  1023
  The number in binary is 1111111111
  The number in octal is 1777
  
  C:\Users\desktop\Desktop\prog_long_long
  Enter an Integer
  1024
  The number in binary is 1410065408
  The number in octal is 2994
  </code></pre>