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 difference between Structure and Unions?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
Why & is used in scanf in c?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
What are the header files used in c language?
Explain how do you search data in a data file using random access method?
How can I find out the size of a file, prior to reading it in?
What is typedef example?
What are the different file extensions involved when programming in C?
What is string function c?
How do I get a null pointer in my programs?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Can you please explain the difference between syntax vs logical error?
How do you print only part of a string?
What is the process to generate random numbers in c programming language?