logo

Crowdly

Browser

Add to Chrome

What is the output of the following program? #include<stdio.h> int main() { ...

✅ 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;

}

More questions like this

Want instant access to all verified answers on moodle.myefrei.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome