C program to remove even numbers and fill it with zero
Input array 1,2,3,4,5,6
Output 1,3,5,0,0,0
#include<stdio.h>
void main()
int i,j,k,n=6,a[]={1,2,3,4,5,6};
clrscr();
for(i=0;i<n;i++)
{
if(a[i]%2==0)
{
a[i]=-1;
}
else
printf("%d",a[i]);
}
for(i=0;i<n;i++)
{
if(a[i]==-1)
printf("0");
}
getch();
}