3 like 0 dislike
225 views

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)
ID: 21875 - Available when: Unlimited - Due to: Unlimited
| 225 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.131.74
©2016-2024

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)
ID: 21876 - Available when: Unlimited - Due to: Unlimited
| 225 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)
ID: 21874 - Available when: Unlimited - Due to: Unlimited
| 225 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)
ID: 21880 - Available when: Unlimited - Due to: Unlimited
| 218 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)
ID: 21879 - Available when: Unlimited - Due to: Unlimited
| 199 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)
ID: 21877 - Available when: Unlimited - Due to: Unlimited
| 225 views
12,783 questions
183,443 answers
172,219 comments
4,824 users