void main()
{
unsigned char tuArray[]="1110111";
unsigned char tuArraySize;
unsigned char tuCnt;
unsigned char tuNoOfZero=0;
tuArraySize = strlen(tuArray);
//Findout no of Zero
for(tuCnt=0; tuCnt<tuArraySize; tuCnt++)
{
if(tuArray[tuCnt]== 0x30)
tuNoOfZero++;
}
for(tuCnt=0; tuCnt<(tuArraySize-tuNoOfZero); tuCnt++)
{
tuArray[tuCnt] = '1';
}
for(; tuCnt<tuArraySize; tuCnt++)
{
tuArray[tuCnt] = '0';
}
printf("%s",tuArray);
}