user20800: i want to convert string for example 
"68976543210" to unsigned long long(64 bit) in mega2560,
 do is possible?
String x="68976543210";
unsigned long long y=?;


user4143: avr-libc lacks strtoull() that I would normally use for such a conversion. You will have to do it manually.
Fortunately it's quite simple - just start with y=0 and, for each character in the string, multiply y by 10 then add the numeric value of the character in the string:
String x = "68976543210";
unsigned long long y = 0;

for (int i = 0; i < x.length(); i++) {
    char c = x.charAt(i);
   if (c < '0' || c > '9') break;
   y *= 10;
   y += (c - '0');
}

Note that the Arduino Print API has no method for printing a 64-bit integer.

20800: <p>i want to convert string for example 
"68976543210" to unsigned long long(64 bit) in mega2560,
 do is possible?</p>

<pre><code>String x="68976543210";
unsigned long long y=?;
</code></pre>
 4143: <p>avr-libc lacks <code>strtoull()</code> that I would normally use for such a conversion. You will have to do it manually.</p>

<p>Fortunately it's quite simple - just start with y=0 and, for each character in the string, multiply y by 10 then add the numeric value of the character in the string:</p>

<pre><code>String x = "68976543210";
unsigned long long y = 0;

for (int i = 0; i &lt; x.length(); i++) {
    char c = x.charAt(i);
   if (c &lt; '0' || c &gt; '9') break;
   y *= 10;
   y += (c - '0');
}
</code></pre>

<p>Note that the Arduino Print API has no method for printing a 64-bit integer.</p>
