Posted By

woofeR on 03/05/09


Tagged

array c function loop global frequency for


Versions (?)

Frequency Finder (Array)


 / Published in: C++
 

  1. int findFreq(int myArray[], int key, int size)
  2. {
  3. int freq[10] = {0};
  4.  
  5. for(int i=0; i<size; i++)
  6. freq[myArray[i]]++;
  7.  
  8. return freq[key];
  9. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: woofeR on March 5, 2009

That's the second quiz of CS201

You need to login to post a comment.