I have written a small test code for Arduino Uno which is as follows:
unsigned char tes[4];
char testing[4];
void setup() {
Serial.begin(9600);
for (int i = 0; i < 4; i++)
{
testing[i] = i;
tes[i] = i;
}
for (int i = 0; i < 4; i++)
{
Serial.print("unsigned char is: ");
Serial.println(tes[i]);
Serial.print("char is: ");
Serial.println(testing[i]);
}
}
}
void loop() {
}
and the output which I get is as follows
unsigned char is: 0
char is:
unsigned char is: 1
char is:
unsigned char is: 2
char is:
unsigned char is: 3
char is:
Can someone help me out why is the difference in output.