this is my function :
int countCharInText (char* text, int size, char toCoun){
char c = 0;
int i = 0;
int frequence = 0;
for(i = 0; i < size-1; i++)
{
if(text[i] == toCount)
frequence++;
}
return frequence;
}
is it correct ?
+ how the main function should be knowing that I cannot use...
User Profile
Collapse
-
but there is a problem , for the space and new lignes what should I do?Leave a comment:
-
this not an assignement I am looking for the code because I need to review for my test and I am not able to impelment the function..so please if you can help me a bit more....Leave a comment:
-
how to implement this ?
what is the code to implement this function?
countCharInText
Counts the frequency of a character in a text
the prototype is
int countCharInText (char* text, int size, char toCount); -
-
I know that IT is a runtime error ..since there is the compiler do not detect it ...and the message is '' that ;exe has encounter a problem and have to close .....)Leave a comment:
-
how should I allocate memory to my pointer ?( it may seem dumy but I am a beginner so;;;;)Leave a comment:
-
I tried lot of things ; still it gives me an error message ...can someone tell me what I need to do exactly?Leave a comment:
-
-
I did not understand where is the error ?? (scanin nowhere ???Leave a comment:
-
-
-
despertly need your help
I need the code to implement those two functions;
myStrCmp
Compares two strings, returns true if equal and false otherwise
int myStrCmp(char* str1, char* str2)
myStrNCpy
Copies N characters from str2 to Str1
void myStrNCpy(char* str1, char* str2, int n)
please help me
this is the code of the first fucntion ...where is the error?
Code:#include<stdio.h> #include"myString.h"
Last edited by Frinavale; Aug 31 '09, 08:31 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
No activity results to display
Show More
Leave a comment: