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 / anil
0 times bcoz everytime it enters second loop condition is
not satisfied ,thus comes out of loop.
| Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers
What are the 5 types of organizational structures?
What is a memory leak? How to avoid it?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
What are pointers? What are stacks and queues?
Tell us the use of fflush() function in c language?
What does void main () mean?
How can you tell whether two strings are the same?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Explain how does flowchart help in writing a program?
How can I read in an object file and jump to locations in it?
What is switch in c?
What are the advantages and disadvantages of c language?
Do you know what are the properties of union in c?
What is nested structure?
Describe the order of precedence with regards to operators in C.