Determine the code below, tell me exactly how many times is
the operation sum++ performed ?
for ( i = 0; i < 100; i++ )
for ( j = 100; j > 100 - i; j--)
sum++;
Answer Posted / daniel
(99 * 100)/2 = 4950
The sum++ is performed 4950 times.
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What is extern keyword in c?
Describe explain how arrays can be passed to a user defined function
Why does notstrcat(string, "!");Work?
What is the advantage of a random access file?
What is the difference between ++a and a++?
What is the purpose of realloc()?
How do we open a binary file in Read/Write mode in C?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
List the difference between a "copy constructor" and a "assignment operator"?
Explain zero based addressing.
How the c program is executed?
What is structure and union in c?
What are different types of variables in c?
Differentiate abs() function from fabs() function.
What is && in c programming?