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...

i have an array of 10 objects whose values are from 1-10
randomly inserted. i have deleted one array object.
tell me what is that value? write the logic of it.

Answer Posted / suren

its simple for guys 4m Engineering background.
if u have an idea with series of numbers, (n(n+1)/2)

first take the sum of all the objects in array, next
subtrat the sum of arrays after deletion of object. this
will give you the deleted object value.

1,2,3... 10; sum = 10(10+1)/2=55

suppose the value of object deleted is 6;

then sum of the array after deletion will be 49;

55-49=6 ANS:

Is This Answer Correct ?    12 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give a brief introduction on side-by-side execution. Can two applications, one using private assembly and the other using the shared assembly be stated as side-by-side executables?

905


Is there any thread in our .net programs?

1023


Which namespace is used to support multithearding in .NET?

947


What is the use of immutability?

1037


Difference abstract class and interface in .net?

1023


What do you mean by web service?

1191


Differences between namespace, class, assembly?

976


SAP Business One(this is intigrated tool of .net)

2177


Explain what is the difference between constants and read-only variables?

891


How to use datagrid value in select statements where condition ,if cell is hyperlink bounded column?

948


Which file is taken by compiler when we have both file Application and Server Configuration file?

2058


What is the difference between reference type and value type?

886


Tell us what is heap and what is stack?

1055


Please explain what is the difference between encrypting a password and applying a hashing?

913


How is threading done in .net?

952