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
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.
Which control loop is recommended if you have to execute set of statements for fixed number of times?
What does 1f stand for?
What are the general description for loop statement and available loop types in c?
How do we make a global variable accessible across files? Explain the extern keyword?
What are global variables and explain how do you declare them?
Is boolean a datatype in c?
What is the data segment that is followed by c?
Why is c called c?
List some of the static data structures in C?
What does #pragma once mean?
Is there any demerits of using pointer?
Can you please explain the difference between syntax vs logical error?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is string in c language?