write the function int countchtr(char string[],int
ch);which returns the number of timesthe character ch
appears in the string. for example the call countchtr("she
lives in Newyork",'e') would return 3.
Answer Posted / vadivelt
Hi all,
In my post, Answer #5 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
How can I remove the leading spaces from a string?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What do you mean by Recursion Function?
what are # pragma staments?
What are the advantages and disadvantages of a heap?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
write a program to generate address labels using structures?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
What are loops in c?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
number of times a digit is present in a number
How can I direct output to the printer?
What are the Advantages of using macro
what is event driven software and what is procedural driven software?