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

write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

2031


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1300


What does 1f stand for?

1091


What are the general description for loop statement and available loop types in c?

1076


How do we make a global variable accessible across files? Explain the extern keyword?

1831


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

1032


Is boolean a datatype in c?

1014


What is the data segment that is followed by c?

1034


Why is c called c?

959


List some of the static data structures in C?

1158


What does #pragma once mean?

1112


Is there any demerits of using pointer?

1018


Can you please explain the difference between syntax vs logical error?

1136


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1036


What is string in c language?

1077