Question: / / ex 0 7 _ 2 . c / / what does this program do ? #include #define SIZE 8 0 size _ t

// ex07_2.c
// what does this program do?
#include
#define SIZE 80
size_t mystery2(const char *s); // prototype
int main(void){
char string[SIZE]; // create char array
puts("Enter a string: ");
scanf("%79s", string);
printf("%d
", mystery2(string));
}
// What does this function do?
size_t mystery2(const char *s){
size_t x;
// loop through string
for (x =0; *s != ; ++s){
++x;
}
return x;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Programming Questions!