Referring to pin map of ATMEGA2560, I learnt that Pin 42-49 digital outputs are mapped to PORTL of the MCU. I have connected digital inputs to these ports. Used digital read to verify and they are OK. I tried to use PORTS for faster read, but they are not working
I just added the following code in set up
DDRL = B00000000;
Printing "0" is the equivalent of B00000000. This simply states that the value of the PORT pins is each zero. As you have defined the entire port to be INPUT (DDRL = B00000000) this is what you would expect as the PORTn register is tied to OUTPUT. If you want the status of INPUT pins, print the PINL register.