Global Arrays read as Zero I have written a code for my Arduino which spans multiple files, In the file containing the main task, i have a Global Array like this

addr_t childAddr[NUM_CHILDS] = { CHILD1_I2C_ADDR, CHILD2_I2C_ADDR };


where

#define NUM_CHILDS  0x02
#define CHILD1_I2C_ADDR         0x10
#define CHILD2_I2C_ADDR         0x02


Now to debug my issue, in my Task i do this

Serial.print(childAddr[0]);
Serial.print(childAddr[1]); 


All i receive is 

00


I looked at the issue online, someone pointed it towards overshooting the RAM, I am working on a Pro Mini with ATmega328P with 2K RAM.
Since addr_t is a character type, I suspect Serial.print() is trying to output the ASCII character representation of your two values. ASCII codes 0x10 and 0x02 are non-printing characters, so it might just be outputting 0's for lack of anything better to do.

To output the data as actual numbers, try casting them to integers:


Serial.print( static_cast&lt;unsigned int&gt;(childAddr[0]) );
Serial.print( static_cast&lt;unsigned int&gt;(childAddr[1]) );