174 views

1 Answer

1 votes
1 votes

When the first loop is executed, it updates the contents of the static array a, to following: [1,2,3,3,5,5,7,8]

Now, when the second loop is executed, it adds all the elements of the array and the result is : 34

Related questions

0 votes
0 votes
1 answer
1
rsansiya111 asked Dec 20, 2021
524 views
Consider the following C program:#include <stdio.h>int r( ){static int num = 7;return num ;}int main ( ) {for (r( ) ;r ( ) ;r ( ) )printf(“ % d”, r( ) );return 0;}Whi...
0 votes
0 votes
1 answer
2
rsansiya111 asked Dec 19, 2021
287 views
0 votes
0 votes
1 answer
3
rsansiya111 asked Dec 17, 2021
316 views
0 votes
0 votes
1 answer
4
rsansiya111 asked Dec 16, 2021
385 views