Question: Can someone please draw it out for me and explain how it works int main(void) {char s[] = HSjodi, *p; for (p = s; *p;
int main(void) {char s[] = "HSjodi", *p; for (p = s; *p; p++) --*p; puts(s); return 0'} Let f be the following function: int f (char *s, cha. *t) {char *p1, *p2, for (p1 = s; *p1 ++{for (p2 = t; *p2; p2++) if (*p1 == *p2) break; if (*p2 == '\0') break;} return p1 - s;} (a) What is the value of f ("abced", "babc")? (b) What is the value off ("abcd", "bcd")? (c) In general, what value does f return when passed two strings s and t
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
