Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

2395


Write a program to swap two numbers without using third variable in c?

1138


What is dangling pointer in c?

1247


Are there namespaces in c?

1137


Define VARIABLE?

1173


What is a dynamic array in c?

1164


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1138


Is exit(status) truly equivalent to returning the same status from main?

1077


difference between native and cross compilers

2138


How to draw the flowchart for structure programs?

9348


Which is better pointer or array?

1035


How do we open a binary file in Read/Write mode in C?

1243


Can the “if” function be used in comparing strings?

1061


What are derived data types in c?

1093


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

1043