Home > Back-end > Please, save the children, study for three hours
Please, save the children, study for three hours
Time:09-20
Write a function strlen function, application results are as follows: The input string s1: China Length=5 Please do not alter the contents of the main program main and other functions, only fill in the curly braces of strlen () function with written several statements, Note: partial source program are given as follows: # include & lt; Stdio. H> Int strlen (char STR []) {
} Void main () {char s1 [80]; Printf (" input string s1: \ n "); Gets (s1); Printf (" length=% d \ n ", strlen (s1)); }
CodePudding user response:
You must pretend to think, ah... -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- int i; for(i=0; STR [I]; I++); return i;