✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What is the output of the following program?
#include<stdio.h>
int main() {
int i = 0, j = 0;
char str[10] = "abcdef";
char str2[10];
while (str[i] != '\0') {
i++;
}
str2[i] = '\0';
while (i >= 0) {
str2[--i] = str[j++];
}
printf("%s\n", str2);
return 0;
}