3 like 0 dislike
208 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
| 208 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.6.220
©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
| 205 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
| 194 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
| 196 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
| 181 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
| 211 views
12,783 questions
183,443 answers
172,219 comments
4,824 users