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 / daniel

(99 * 100)/2 = 4950
The sum++ is performed 4950 times.

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you avoid including a header more than once?

989


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

1108


Is array a primitive data type in c?

1082


How reliable are floating-point comparisons?

1108


What is difference between class and structure?

1123


Implement bit Array in C.

1157


Why is c used in embedded systems?

1129


What are the applications of c language?

1082


What does do in c?

1066


What is pragma in c?

1223


Define macros.

1285


Multiply an Integer Number by 2 Without Using Multiplication Operator

772


How can I find out if there are characters available for reading?

1116


Why is sprintf unsafe?

1087


What are dangling pointers? How are dangling pointers different from memory leaks?

1330