logo

Crowdly

Browser

Add to Chrome

What is the output of this program? int a[] = {1, 2, 3}; int cnt = 0; for(int i ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What is the output of this program?

int a[] = {1, 2, 3};

int cnt = 0;

for(int i = 0; i < 3; i++)

    for(int j = i+1; j < 3; j++)

        if(a[i] + a[j] > 3) cnt++;

printf("%d", cnt);

!
More questions like this

Want instant access to all verified answers on moodle.usthlearningsupport.vn?

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

Browser

Add to Chrome