Question: A- What does the following function do? Explain. int guess (char string[]) { int len strlen(string); int i; char tmp; for (i = 0;
![A- What does the following function do? Explain. int guess (char string[])](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2022/11/6386c29c53f35_0286386c29c2c2f0.jpg)
A- What does the following function do? Explain. int guess (char string[]) { int len strlen(string); int i; char tmp; for (i = 0; i < len / 2; i = 1 + 1) ( tmp = string[i]; string[i] = string [len 1 - 11; string [len 1 - 1] = tmp; = } return 0; B- Rewrite the function using pointers.
Step by Step Solution
3.41 Rating (151 Votes )
There are 3 Steps involved in it
Answer A The function reverses the string Inside the loop we can observe that we are sw... View full answer
Get step-by-step solutions from verified subject matter experts
