Password locker using EEPROM

            strncpy(string1,string2);    here n is the number of characters

#include<avr/eeprom.h>
#include<avr/io.h>
#include<stdio.h>
#include<string.h>
#include<util/delay.h>
#include"keypad.h"
#include"lcd.h"
unsigned char j,display[20];
char StringData[]="pass091109";			/*****This is your passward 091109***********/
char im[20]="pass";
uint8_t sample,chance=4;
int locker;
int main(void)
{
/********************************Store in EEPROM*****************************************/
eeprom_update_block (( const void *) StringData , ( void *) 12, sizeof(StringData));
/****************************************************************************************/
keypad_init();
DDRC|=(1<<DDC0);
LCD_INIT();
DDRC&=~(1<<DDC1);												//Enter key
PORTC|=(1<<PC1);
START:;
LCD_Clear();
LCD_write_string(1,1,"Press any key");
_delay_ms(1000);
sample=PINC&(1<<PC1); 										//PulUp internal resistance
while(sample)
{
		sample=PINC&(1<<PC1);
		j=key_press(0x7f);
		LCD_write_string(number,2,"*");
		im[number+3]=j;
		chance=chance-(!sample);
		
	}
/*Filter section*/
/**************************************************************************************/
im[3]='s';
char StringOfData [sizeof(StringData)];
eeprom_read_block (( void *) StringOfData , ( const void *) 12, sizeof(StringData)) ;
/**************************************************************************************/
locker=strcmp(StringOfData,im);
if(locker)
	{
	PORTC&=~(1<<PC0);
	LCD_write_string(1,1,"Pass. incurrect");
	cleardata();						//clear storage
	_delay_ms(1000);
	sprintf(display,"%d chance left       ",chance);
	LCD_write_string(1,1,display);
	_delay_ms(1000);
	if(chance==0)
		{
				LCD_write_string(1,1,"****************");
				LCD_write_string(1,2,"*****locked*****");
				goto END;
		}
	goto START;
	}
	else
		{
				PORTC|=(1<<PC0);
				LCD_write_string(1,1,"Passward currect");
				LCD_write_string(1,2,"******open******");
		}
	END:;
	return 0;
}