3 like 0 dislike

What would be the values of the array "a" in the following program?

 

#include <stdio.h>

int main()

{

int i, a[3] = {4, 2, 0}, b[3] = {2, 3, 4};

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

a[b[i]-a[2-i]]++;

return 0;

}

 

References: C From Theory

 

[Normal] Essay (Open question) - asked in Introduction to Computer Programming I (C) by (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 44 views
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.158.78.110
©2016-2021

Related questions

3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 29 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 28 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 36 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 39 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 40 views
11,166 questions
132,626 answers
131,307 comments
3,823 users