What would be the best way to increment a value that contains leading zeroes? For example, I\'d like to increment \"00000001\". However, it should be noted that the number of
"my code is in c"
int a[6]={0,0,0,0,0,0},i=5,k,p;
while(a[0]!=10)
{
do
{
for(p=0;p<=i;p++)
printf("%d",a[p]);
printf("\n");
delay(100);
a[i]++;
}while(a[i]!=10);
for(k=0;k<=i;k++)
if(a[i-k]==10)
{
a[i-(k+1)]++;
a[i-k]=0;
}
}