So I have an array of integers. I use a for loop to transfer the contents of the int array into the char array. The problem is when I output the values, the decimal %d outputs 0 and 1s but the %c outputs a smiley emotion.
int main()
{
int array[10] = {0,1,0,1,1,0,1,1,1,0,0};
char array2[10];
int i;
for(i=0;i<10;i++)
{
array2[i] = array[i];
printf("%c %d\n", array2[i],array2[i]);
}
}