I am trying to print a char array on separate line for each element. This is what I have tried and neither way is working. I would like the output to look something like.
The array length is c c
The array length is o o
The array length is d d
The array length is e e
char str1[5] = "code";
char str2[5] = "code";
for(i; i < 10; i++)
{
printf("The array length is %c %c :\n", str1[i], str2[i]);
}
char str1[5] = "code";
char str2[5] = "code";
for(i; i < 10; i++)
{
printf("The array length is %s %s :\n", str1[i], str2[i]);
}