| | |
plz help me out guys!!!!!!!!
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2004
Posts: 47
Reputation:
Solved Threads: 0
hi guys......
i have a problem in writing a program of "how to delete the duplicate elements in an array"
for example....if i enter an array like:
10 20 30 40 30
then it should print:
10 20 30 40
so could plz help me out?????
i have attempted little though....but don't know how can i go ahead....
#include<stdio.h>
#include<conio.h>
int main(void)
{
int a[5],i,j;
clrscr();
printf("ENTER ARRAY ELEMENTS:");
for(i=0;i<5;i++)
scanf("%d",&a[i]);
fflush(stdin);
for(i=0;i<5;i++)
{
for(j=i;j<4;j++)
{
//i don't know now where do i go....from here on.....how to find the element which is repeating that is the duplicate and then how to delete that.....
so plz help me out......
i have a problem in writing a program of "how to delete the duplicate elements in an array"
for example....if i enter an array like:
10 20 30 40 30
then it should print:
10 20 30 40
so could plz help me out?????
i have attempted little though....but don't know how can i go ahead....
#include<stdio.h>
#include<conio.h>
int main(void)
{
int a[5],i,j;
clrscr();
printf("ENTER ARRAY ELEMENTS:");
for(i=0;i<5;i++)
scanf("%d",&a[i]);
fflush(stdin);
for(i=0;i<5;i++)
{
for(j=i;j<4;j++)
{
//i don't know now where do i go....from here on.....how to find the element which is repeating that is the duplicate and then how to delete that.....
so plz help me out......
I'm never going to answer another question of yours again. Clearly you have no respect for the people that volunteer their time to help you. First you bump your thread before a satisfactory amount of time has passed (a few days I could understand, but not less than 30 minutes), then you post a second thread with the same question. So I will now show you the same respect you have shown me.
*plonk*
*plonk*
New members chased away this month: 4
![]() |
Similar Threads
- Linking error in the compiler given by topcoder. Plz help me out guys. (C++)
- Problem in my sliding div...plz help.... (JavaScript / DHTML / AJAX)
- PLZ REPLY (IT Professionals' Lounge)
- Recursive procedure (to display a linked list) (Pascal and Delphi)
- Urgent help needed......Plz somebody help me..... (Windows NT / 2000 / XP)
- what doesnt work? plz help guys (C++)
- MERGED: Deleting duplicates in an array (plz help me out!!!!!!!) (C)
Other Threads in the C Forum
- Previous Thread: Only three answers ???
- Next Thread: Programming with MS Agent ?
Views: 2018 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for C
#include * append array arrays asterisks binarysearch calculate changingto char character cm command copyimagefile creafecopyofanytypeoffileinc database directory dynamic execv feet fgets file floatingpointvalidation fork forloop framework function functions getlogicaldrivestrin givemetehcodez grade graphics gtkwinlinux hacking histogram homework ide include incrementoperators input intmain() iso kernel keyboard kilometer km lazy license linked linkedlist linux list lists looping loopinsideloop. lowest matrix microsoft mqqueue number oddnumber odf openwebfoundation overwrite owf pause pdf performance pointer posix probleminc process program programming radix recursion recv recvblocked research reversing scripting segmentationfault sequential single socket socketprogramming spoonfeeding standard string student systemcall testing threads turboc unix urboc user variable whythiscodecausesegmentationfault windowsapi






