Question: In C language 1. Finish writing this program that finds the length of a string. Do not use the builtin strlen function. #include int main(int

In C language

In C language 1. Finish writing this program that finds the length

1. Finish writing this program that finds the length of a string. Do not use the builtin strlen function. #include int main(int argc, 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 ih 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

To complete the task we need to write a C program that finds the length of a string and counts the n... View full answer

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!