Question: PLEASE USE C WHEN SOLVING 1. Finish writing this program that finds the length of a string. Do not use the builtin strlen function. #include

PLEASE USE C WHEN SOLVING

PLEASE USE C WHEN SOLVING 1. Finish writing this program that finds

1. Finish writing this program that finds the length of a string. Do not use the builtin strlen function. #include int main(int arge, char **argv) char *input = argv[1]; int length; printf("The length of the string is %d ", length); } When run, you should get: $./a.out "This is a really long string" The length of the string is 28 2. Add some code to the above code so that it counts the number of h's in the string. You should be able to count both upper case and lower case h's. You will need to loop over the string, and whenever you find a 'h' increment your count. When run, you should get: $./charcount "Hello World" The length of the string is 11 There is i h in the string $./charcount "Hello there" The length of the string is 11 There are 2 h's in the string Note the difference in the output depending on if there is one 'h' or more than one 'h' in the string

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!