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 the functions to open and close file in c language?
How can I find out the size of a file, prior to reading it in?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Tell us something about keyword 'auto'.
What is getch c?
How will you write a code for accessing the length of an array without assigning it to another variable?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
What are types of functions?
Once I have used freopen, how can I get the original stdout (or stdin) back?
What is a pointer value and address in c?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
What is the use of the function in c?
How to Throw some light on the splay trees?
What is pragma in c?
how many key words availabel in c a) 28 b) 31 c) 32