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?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here