1. Write the function int countchtr(char string[ ], int ch);
which returns the number of times the character ch appears
in the string.
Example, the call countchtr(“She lives in NEWYORK”, ‘e’)
would return 3.

Answer Posted / vadivelt

Hi all,

In my post, Answer #3 pls change the statement in if
condition from "ch <= 96" to "ch <= 90"

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of using new operator as compared to the function malloc ()?

752


What is the best organizational structure?

637


How does sizeof know array size?

618


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

1722


Where does the name "C" come from, anyway?

639






What are the types of type specifiers?

616


What is a class c rental property?

601


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1442


Why header file is used in c?

571


Define Array of pointers.

629


Why is C language being considered a middle level language?

648


Why #include is used in c language?

590


What is the size of a union variable?

596


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5051


How does normalization of huge pointer works?

623