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
What does struct node * mean?
What are the basic data types associated with c?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
How do you declare a variable that will hold string values?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
Which is the best website to learn c programming?
What is the use of a ‘ ’ character?
What do mean by network ?
What are runtime error?
What does %d do?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
What is the difference between call by value and call by reference in c?
In a header file whether functions are declared or defined?
What does the message "automatic aggregate intialization is an ansi feature" mean?