What Is The Name Of This Sort Algorithm??

Reply

Join Date: Mar 2005
Posts: 73
Reputation: nabil1983 is an unknown quantity at this point 
Solved Threads: 0
nabil1983 nabil1983 is offline Offline
Junior Poster in Training

What Is The Name Of This Sort Algorithm??

 
0
  #1
Dec 11th, 2005
Hello

Can someone tell me what this sort algorithm is called.?
And if possible a little bit of information about it...


  1. void record_search(struct CdRecords cdDB[])
  2. {
  3. system("CLS");
  4. int i;
  5. char name[20];
  6.  
  7. printf("Enter Name:");
  8. scanf("%s", name);
  9. for(i = 0;i<datasize;i++)
  10. {
  11. if((strcmp(name,cdDB[i].Artist))==0)
  12. {
  13.  
  14. ENTER DATA TO BE DISPLAYED
  15. }
  16. }
  17. printf("Press Enter To Continue");
  18. // fflush(stdin);
  19. getch();
  20.  
  21. }
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: What Is The Name Of This Sort Algorithm??

 
0
  #2
Dec 11th, 2005
I dont think it is a sorting function at all. All it does is ask the user for a name, searches the database for a match, and once a match is found display the information the user wants to see. Nope, no sort.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 73
Reputation: nabil1983 is an unknown quantity at this point 
Solved Threads: 0
nabil1983 nabil1983 is offline Offline
Junior Poster in Training

Re: What Is The Name Of This Sort Algorithm??

 
0
  #3
Dec 12th, 2005
Originally Posted by WolfPack
I dont think it is a sorting function at all. All it does is ask the user for a name, searches the database for a match, and once a match is found display the information the user wants to see. Nope, no sort.
My fault sorry,, i meant to ask what kind of SEARCH method is this... ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 598
Reputation: SpS is on a distinguished road 
Solved Threads: 32
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: What Is The Name Of This Sort Algorithm??

 
0
  #4
Dec 12th, 2005
Originally Posted by nabil1983
My fault sorry,, i meant to ask what kind of SEARCH method is this... ?
Linear Search
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 73
Reputation: nabil1983 is an unknown quantity at this point 
Solved Threads: 0
nabil1983 nabil1983 is offline Offline
Junior Poster in Training

Re: What Is The Name Of This Sort Algorithm??

 
0
  #5
Dec 12th, 2005
Hey thanx for that one

also check this line out:

  1. memset(cdDB,0,datasize*sizeof(struct CdRecords));

what does memset exactly do as i have neva encountered it before and want to know how it actually works.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 598
Reputation: SpS is on a distinguished road 
Solved Threads: 32
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: What Is The Name Of This Sort Algorithm??

 
1
  #6
Dec 12th, 2005
Syntax
  1. #include <string.h>
  2. void *memset(void *s, int c, size_t n);
Description
memset() sets the first n bytes in memory area s to the value of c (converted to an
unsigned char). It returns s.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC