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 is the difference between procedural and functional programming?
What is unsigned int in c?
How pointer is different from array?
Why string is used in c?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
What do you mean by command line argument?
Can a variable be both static and volatile in c?
What is the use of pointers in C?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
difference between native and cross compilers
How would you use the functions fseek(), freed(), fwrite() and ftell()?
I came across some code that puts a (void) cast before each call to printf. Why?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
What is array of structure in c programming?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10