Not getting correct values in I2C interfacing in Atmega
IT WORKS!!
So, after I noticed that the LCD is printing only 255 and nothing else, I sat and thought about it. Then I realized that 255 is 0xff in hexadecimal so that meant the SCL line wasn't being held long enough for the slave to transmit data. So I simply put a small delay of 100 ms after the read function and it started working. :D

 I2C_start(0x01);
 yy = I2C_read_ack();    
 _delay_ms(100);
 getdata=yy; //getdata is just another unsigned char variable. I thought that maybe yy 
 yy=0;       //isn't getting refreshed or something, so i made a small reset sort of thing here.
 xx = getdata&amp;zz;
 xx&lt;&lt;8;
 I2C_stop();