For this question, refer to the following C program: int FindLen(char *); int main(void) { char str[10]; printf("Enter a string : "); scanf("%s", str); printf("%s has %d characters\n", str,...



For this question, refer to the following C program:


int FindLen(char *);


int main(void)


{


char str[10];


printf("Enter a string : ");


scanf("%s", str);


printf("%s has %d characters\n", str, FindLen(str));


}


int FindLen(char * s)


{


int len=0;


while (*s != '\0') {


len++;


s++;


}


return len;


}


a. What is the size of the stack frame for the functions main and


FindLen?


b. Show the contents of the stack just before FindLen returns if the


input string is apple.


c. What would the stack frame look like if the program were run and


the user typed a string of length greater than ten characters? What


would happen to the program?



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here