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
Are negative numbers true in c?
What is function and its example?
How many bytes is a struct in c?
Describe dynamic data structure in c programming language?
What are global variables and explain how do you declare them?
What is c variable?
What is the advantage of c?
What is d scanf?
Is javascript written in c?
Why is c so popular?
Where define directive used?
Why is it usually a bad idea to use gets()? Suggest a workaround.
Is c easy to learn?
What are c preprocessors?
What is quick sort in c?