第1个回答 2010-01-01
#include<stdio.h>
#include<string.h>
void main(){
printf("请输入字符串:");
char str[80];
scanf("%s",str);
printf("首个字符%c 字符长度%d",str[0],strlen(str));
}
C语言版,vc6.0下编译通过
第2个回答 2010-01-04
accept"请输入=" to a
?len(a)
?left(a,1)
第3个回答 2010-01-01
#include<iostream.h>
#include<string.h>
void main()
{
char a[100];
cout<<"input the word: ";
cin>>a;
cout<<endl<<strlen(a)<<" "<<a[0]<<endl;
}
C++的,看看适合不,本回答被提问者采纳
第4个回答 2010-01-03
你是不是也是嘉大的,怎么一样的题目的?