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
Describe explain how arrays can be passed to a user defined function
What are the types of bitwise operator?
Explain the use of bit fieild.
What is "Hungarian Notation"?
Tell me when would you use a pointer to a function?
Define the scope of static variables.
Explain the bubble sort algorithm.
What is the right way to use errno?
What is a list in c?
What is c++ used for today?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
Define Array of pointers.
How do you construct an increment statement or decrement statement in C?
What is pass by reference in c?
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent