logo

Crowdly

Browser

Add to Chrome

What is the output of the following code fragment? char s[] = "2LEIC 022"; in...

✅ 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 code fragment?

char s[] = "2LEIC 022";

int i = 0;

do { i++; } while (s[i] != '\0' && s[i] != '2');

s[i] = '\0';

std::cout << i << " \"" << s << "\"\n";

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle2425.up.pt?

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

Browser

Add to Chrome