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 static memory allocation?
What are the advantages of the functions?
Why c is called procedure oriented language?
Which driver is a pure java driver
What is bin sh c?
What is typedf?
show how link list can be used to repersent the following polynomial i) 5x+2
What are identifiers and keywords in c?
What is c value paradox explain?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Why void is used in c?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
Why is struct padding needed?
why wipro wase
How can you read a directory in a C program?