Я пытаюсь указать на некоторые ошибки кода, используя комментарий.
И я думаю, что этот код также имеет логическую проблему в том, что вы хотите поместить список чисел в нечетный массив и четный массив, но начальные значения четного и нечетного массива равны нулю.
Когда вы разделяете список чисел на массив буксировок, вы не перезаписываете все начальные значения, это приведет к тому, что наконец-то будет напечатано какое-то нулевое значение, но они не принадлежат ни к нечетным, ни к четным.
#include <stdio.h>
#include <math.h>
int main()
{
int a[100],odd[100],even[100],i,j,n;
//you should first assign a vaule to n and then use n
//and be careful for the value of the n,
//it should not larger than the size of the array,or it will overflow.
for(i=0;i<=n;i++)
{
a[i]=0;
odd[i]=0;
even[i]=0;
}
//put below two lines to the front of the above for-loop
printf("Enter the number of elements which you want to check as even or odd");
scanf("%d",&n);
for(i=0;i<n;i++)
{
if(a[i]%2==0)
a[i]=even[i];
else
a[i]=odd[i];
}
for(i=0;i<n;i++)
//you type a wrong 'printf' satement,here is the right way
//printf("The set of even numbers is %d",even[i]);
printf("The set of even numbers is %d"),even[i];
for(i=0;i<n;i++)
printf("The set of even numbers is %d"),odd[i];//you type a wrong 'printf' satement
return 0;
}