You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
450 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include <bits/stdc++.h>
using namespace std;
const int N = 110;
char a[N];
int main() {
scanf("%s", a + 1); //输入abcdef共6个字符,放过下标为0的位置从下标为1开始
int len = strlen(a + 1); //含义从a下标偏移为1开始计算到末尾\0的长度
printf("%d", len); //输出答案6,理解让从1开始到末尾尾巴在哪里自己找计算返回长度
return 0;
}