| | |
MERGED: Deleting duplicates in an array (plz help me out!!!!!!!)
![]() |
•
•
•
•
Originally Posted by galmca
i have been online here for 2 hrs..almost and didn't get any reply from any1/../so i was checking on some other threads of this site....as im new to this site...so plz don't take it otherwise...and help me out.......plz with this problem......
Come on now. We're doing this for free-- you have no right to complain even if we don't answer in 2 days! Please be more mindful in the future. If nobody answers your question promptly, it's likely because we don't have the answer, or the right person has not yet visited the site.
Please be more considerate of other forum members, and don't bump your post in the same day you posted.
Alex Cavnar, aka alc6379
>it's likely because we don't have the answer, or the right person has not yet visited the site.
Or the first person who wanted to help was too insulted and deleted the meat of her post.
Anyway, it's best to just ignore people like galmca. They go away after a short time and leave us in peace.
Or the first person who wanted to help was too insulted and deleted the meat of her post.
Anyway, it's best to just ignore people like galmca. They go away after a short time and leave us in peace. I'm here to prove you wrong.
C Syntax (Toggle Plain Text)
#include <stdio.h> int main(){int*i,*j,a[]={10,20,30,40,30};for(i=a;i<&a[sizeof a/sizeof*a];++i){for(j=a;j<i;++j){if(*i==*j){break;}}if(i==j){printf(&",%d"[i==a],*i);}}putchar('\n');return 0;}
•
•
•
•
Originally Posted by Chainsaw
Well, galmca has legitemate questions and supplies some sample code, so s/he just needs to learn a little etiquate. That's better than the people who type in the question the professor posed and wants us to do their homework.
Alex Cavnar, aka alc6379
•
•
•
•
Originally Posted by Dave Sinkula
C Syntax (Toggle Plain Text)
#include <stdio.h> int main(){int*i,*j,a[]={10,20,30,40,30};for(i=a;i<&a[sizeof a/sizeof*a];++i){for(j=a;j<i;++j){if(*i==*j){break;}}if(i==j){printf(&",%d"[i==a],*i);}}putchar('\n');return 0;}
C Syntax (Toggle Plain Text)
#include<stdio.h> #include<stdlib.h> a[20]={0};i=0;n=20;d(j)int(j);{j<n?printf("%-3i", j++[a]),d(j):putchar('\n');}e(j)int(j);{j<20?j++[ a]=rand()%10,e(j):d(0);}f(j){j<n-1?j[a]=a[j+1],f( j+1):--n;}g(i,v)int(i),v;{return(i>=n?i:i[a]==v?f (i),g(i,v),i:g(i+1,v),i);}main(){!i?e(0):i==n?d(0 ):0;return(i!=n?(i=g(i+1,i[a])),main():0);}
I'm here to prove you wrong.
•
•
Join Date: Oct 2004
Posts: 47
Reputation:
Solved Threads: 0
im really sorry but i didn't get the code which has been provided to me...it seems really complex when i read that....so could u plz help me out in the terms of the way i wrote....that way i'll be able to understand better...like to find out the duplicate element in an array...
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
if(a[i]==a[j])
printf("duplicate exists");
else
printf("duplicate does not exists");
}
}
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
if(a[i]==a[j])
printf("duplicate exists");
else
printf("duplicate does not exists");
}
}
I think on my part, Narue is a smart person, but does have a short fuse for newbies, i was new, but i found fast how to fit in better, read some other post's, to figure out how things go, some people arn't like me and go to the extent to fit in. galmca does have a good question, since ima newbie, and just learned the loops and what not, idont know how to helpm, Narue, you'r smart, but atleast don't be so rude about it, and yes galmca, i have 2 post'sd that have been here for days and, no answer, so i took matters into my own hands, and did it myself. They arn't paid, so sometimes, do it yourself has to be sufficient..
![]() |
Similar Threads
Other Threads in the C Forum
- Previous Thread: Help with strings and file directory tree
- Next Thread: Fatal Error C010?
| Thread Tools | Search this Thread |
#include * adobe ansi api array asterisks binarysearch centimeter changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc csyntax database directory dynamic execv feet fgets file fork function getlasterror getlogicaldrivestrin givemetehcodez global grade gtkgcurlcompiling gtkwinlinux hacking hardware highest histogram ide include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue number odf opendocumentformat opensource owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing segmentationfault sequential single socket socketprograming standard string systemcall threads turboc unix user voidmain() wab whythiscodecausesegmentationfault windows.h windowsapi






