How to pass string for EEPROM write for ATMega32? (in the following code)
Variables stored in the EEPROM on AVRs in C must be placed in the .eeprom section.

(From http://www.nongnu.org/avr-libc/user-manual/group_avr_eeprom.html)

#define     EEMEM   __attribute__((section(".eeprom")))
void        eeprom_write_block (const void *__src, void *__dst, size_t __n)


To store a variable in EEPROM and access it, you want something like:

char EEMEM myVar;

void writeMyVal(char c)
{
  eeprom_write_block(&amp;c, &amp;myVar, sizeof(myVar));
}

void readMyVal(char *c)
{
  eeprom_read_block((void*)c, &amp;myVar, sizeof(myVar));
}


Here's a tutorial.