The Due will use 32 bit integers if you don't tell it any differently as it is a 32 bit processor. 51,539,607,540 requires more than 32 bits to store (you only get up to about 4 billion if you use unsigned integers, 2 billion for signed). But, you can force the use of 64 bit integers which should then give you the result you are looking for.
// init
long long parm1 = 0;
long long parm2 = 0;
long long parm3 = 0;
long long parm4 = 0;
long long parm5 = 0;
long long parm6 = 0;
unsigned int parm7 = 0;
The integer type result of the addition of 51539607540 and 2969567055 can't be displayed using print function as it supports only 32-bit data type. We may use the following codes to do it:
unsigned long long x1 = 51539607540 + 2969567055;//54509174595
for (int n = 0; n<=10; n++)
{
byte y1 = x1%10 + 0x30;
asciiArray[10-n] = y1;
x1 = x1/10;
}
for (int i = 0; i<=10; i++)
{
lcd.write(asciiArray[i]); //LCD shows: 54509174595
}
"By default, input is being given with the keyboard, and output is displayed on your screen. Your keyboard is your "standard input" (stdin) device, and the screen is the "standard output" (stdout) device." (Google)
I am impressed to see the clever way (Post#4) of displaying 64-bit integer data on the Serial Monitor of Arduino IDE using printf() function while Serial.print() is unable to do it.
Arduino DUE Board contains a very powerful 32-bit processor (SAM3X8E) which is comparable to Intel 80386DX processor.
The mechanism through which the Computer Monitor is a stdout device to an 80386DX-based Computer, it is same mechanism that makes the Serial Monitor of Arduino IDE a stdout device for the SAM3X8E-based Microcomputer (the Arduino DUE).
yes, surprisingly printf works now with 1.8.3 on my PC, with my older 1.6.12 on my notebook it didn't though.
So far I always used sprintf() plus Serial.print for that prupose.