| | |
character processing
![]() |
Well, suppose you have the string "GIRL". A string is an array of characters. Store the letter you want to search for as a character. So what you will have to do is start at the beginning of the array, and recursively traverse it one character at a time. We look at the first character. Is it equal to our search character? If yes, increment our counter. Move to the second element (character) in the array. Check if it is a match. Then move to the next character, etc.
i think you mean || (or) instead of && (and), other than that what you posted should work.
As for the other ? , If you know the length of the file, you can stop immedietly once a certian frequency has been found.
As for the other ? , If you know the length of the file, you can stop immedietly once a certian frequency has been found.
A Hacker's Mind:
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
•
•
Join Date: Mar 2004
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by machakwa
can i use if statement to count the frequency
for example
c=getchar()
if c='a' && 'A'
cnta++
.....to if c=z...
and one more question
when more than one characters have the same frequencies
how can i take out the earlier one ?
![]() |
Similar Threads
Other Threads in the C Forum
- Previous Thread: Library compatibility problem?
- Next Thread: Screenshot
| Thread Tools | Search this Thread |
#include adobe api array arrays asterisks binarysearch calculate char cm copyanyfile copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile createprocess() csyntax database directory dynamic feet fflush fgets file fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o include incrementoperators input interest kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix meter microsoft motherboard mqqueue mysql number odf open openwebfoundation owf pattern pdf performance pointer posix probleminc process program programming pyramidusingturboccodes radix read recursion recv repetition research scanf scheduling segmentationfault send sequential shape socket socketprograming stack standard string systemcall turboc unix user voidmain() wab win32api windows.h







