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 are types of structure?
What is the use of getchar functions?
What are derived data types in c?
how to find binary of number?
What is the right way to use errno?
What are register variables in c?
What are external variables in c?
what is the basis for selection of arrays or pointers as data structure in a program
Did c have any year 2000 problems?
What is a string?
What is logical error?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
What is non linear data structure in c?
What is the difference between functions getch() and getche()?