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 is the difference between #include

and #include “header file”?

542


What is a pointer value and address in c?

621


what do u mean by Direct access files? then can u explain about Direct Access Files?

1633


Difference between malloc() and calloc() function?

648


What is the size of a union variable?

591






What is the difference between typedef struct and struct?

589


Write a program with dynamically allocation of variable.

597


What is a lvalue

654


what will be maximum number of comparisons when number of elements are given?

1403


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

592


What does. int *x[](); means ?

627


What is atoi and atof in c?

610


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

554


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

1594


Explain how do you search data in a data file using random access method?

687