I am trying to repeat elements of an array but stuck in an infinite loop
the size of the array is currently 2 , I am trying to repeat these elements again to make the size 5, for example
sample output:
char a[]="ED";
trying to make it
char a[]="EDEDE";
the code is as follows
while(sizeof(a)<5)
{
for(i=0;i<2;i++){
a[fk]=a[i];
fk++;}
}
goes into infinite loop