deleteCont(){/*function in deleting contacts*/
printf("enter contact you want to delete: ");
getchar();
fgets(find,100,stdin);
j = 0;
while(strcmp(contacts[j],find) != 0){/*start of while loop*/
if (strcmp(contacts[i],find) == 0){/*start of first while loop*/
printf("you want to delete %s",contacts[i]);
size = strlen(contacts[j]);
for(i = 0 ; i < size ; i++){/*start of 2nd for loop*/
if(contacts[j] != '\0'){
contacts[j][i] = '\0';
}else{
break;
}
}
printf("contact deleted!!!!");
break;
}else if(strcmp(contacts[i],find) != 0 && j > 21){
printf("Contact name not found!!!\n");
break;
}else{
printf("");
}
j = j + 1;
}
}
could anyone help me!!find problem!!!
i dont know if i'm wrong or i'm correct with this??
tnxx in advance...