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 do you understand by normalization of pointers?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
What is function in c with example?
How can you find the exact size of a data type in c?
Is it fine to write void main () or main () in c?
What is the function of volatile in c language?
What is p in text message?
Explain what math functions are available for integers? For floating point?
What is #define in c?
How can I swap two values without using a temporary?
What is difference between arrays and pointers?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
Explain setjmp()?
Do you know what are the properties of union in c?
What are the types of operators in c?