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 / santosh
when i=0
j=100 and 100>100-1(false) come out of the loop and the sum
is executed 0 times
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
Write a program to swap two numbers without using third variable in c?
What is dangling pointer in c?
Are there namespaces in c?
Define VARIABLE?
What is a dynamic array in c?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
Is exit(status) truly equivalent to returning the same status from main?
difference between native and cross compilers
How to draw the flowchart for structure programs?
Which is better pointer or array?
How do we open a binary file in Read/Write mode in C?
Can the “if” function be used in comparing strings?
What are derived data types in c?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..