Good day all, I have two array which I want to copy some data from the first array to the second array without repeating any values in the second array.Could someone tell me what I am not getting here.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main()
{
char *hours;
char *strl;
hours={0,0,0,0,1,1,2,2,2,5,5,10,10,10,10,10,.,.,.,23}
strl=calloc(100,sizeof(char));
sprintf(strl, "%d", hours);
if(strcmp(strl,hours))
{
if(*strl)
strcpy(strl,hours);
}
printf("%s ",strl;
}