Programming Compiler

profileSiper

This assignment gives an opportunity to practice pointer and string manipulation. You should not call any existing string function from C++ string library. You need to implement three function defined as I do in copy function. 

 

//compare string s1 and s2, return 1 if s1>s2, return –1 if s1<s2,  //return 0 if s1 equal to s2 int strcmp(const char* s1,const char* s2); 

 

//return the string length of string s int length(const char* s); 

 

//return the number of times character “c” in string “s” int countChar(const char* s,const char c); 

 

The main function is provided as: 

 

This attachment has it Please look carefully to this question 

  • 9 years ago
  • 20
Answer(2)

Purchase the answer to view it

blurred-text
  • attachment
    StringManipulation.zip

Purchase the answer to view it

blurred-text
NOT RATED
  • attachment
    assignment.zip