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 are global variables and explain how do you declare them?
What is the use of c language in real life?
ATM machine and railway reservation class/object diagram
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
What are reserved words with a programming language?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What is the difference between #include and #include 'file' ?
What is %g in c?
Is r written in c?
Why is extern used in c?
What is the use of getch ()?
How can you avoid including a header more than once?
How can you determine the maximum value that a numeric variable can hold?
What is action and transformation in spark?
What are the 4 data types?