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

Write a program for deleting duplicate elements in an array

Answer Posted / bhanuprakash a

/* here is the actual logic */
for(i=1; i<n; i++)
{
for(j=i+1;j<=n;j++)
{
if(a[i] = a[j])
{
for(k=j;k<n;k++)
{
a[k]=a[k+1]; //deletion
n=n-1;
}
}
}
}

Is This Answer Correct ?    7 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are negative numbers true in c?

1072


What is function and its example?

1232


How many bytes is a struct in c?

1176


Describe dynamic data structure in c programming language?

1101


What are global variables and explain how do you declare them?

1113


What is c variable?

1050


What is the advantage of c?

1134


What is d scanf?

1099


Is javascript written in c?

1074


Why is c so popular?

1169


Where define directive used?

1102


Why is it usually a bad idea to use gets()? Suggest a workaround.

1797


Is c easy to learn?

995


What are c preprocessors?

1207


What is quick sort in c?

1099