<span style="font-family: Arial, Helvetica, sans-serif;">
</span>
<span style="font-family: Arial, Helvetica, sans-serif;">#include<iostream></span>
using namespace std;
int main()
{
char str[50];
int len=0;
cout<<"请输入一个字符串:";
cin.get(str,50);
while(str[len]!='\0')
len++;
cout<<"字符串"<<str<<"的长度为:"<<len<<endl;
return 0;
}
<pre name="code" class="html">#include "stdio.h"
#define LENGTH 10
#define