更多"自定义标识符由字母、数字或下划线组成,且第一个字符必须是( )"的相关试题:
[填空题]字段名必须是这样一个字符串:以字母或汉字开头,由字母、汉字、数字、下划线等组成,其长度不超过______个字符。
[填空题][程序5.1说明]
下列程序运行时,当单击窗体后,从键盘输入一个字符,判断该字符是字母字符、数字字符还是其他字符,并做相应的显示。窗体上无任何控件,并禁用Ase和Chr函数,Select Case语句中禁用枚举值。
[Visual Basic代码]
Private Sub Form Load ( )
Dim x As String*1
X= (1) (“请输入单个字符”,“字符”)
Select Case UCase ( (2) )
Case (3) 。
Print X+“是字母字符”
Case (4)
Print X+ “是数字字符”
Case Else
Print X+“是其他字符”
End Select
[程序5.2说明]
在窗体上画一个名称为Timer1的计时器和一个名称为Labe11的标签。当运行程序后,将在标签中显示当前时间的数字时钟(包括时:分:秒)。
[Visual Basic代码]
Private Sub Fom_Load ( )
Timer1.Interval=1000
EndSub
Private Sub Timer1_ timer( ) (5)
EndSub
[填空题]C语言规定标识符只能由字母、()和()3种字符组成,且第一个字符必须为字母或()。
[填空题]以下程序段的功能是:创建一个字符串,其内容为由0到9的十个数字所组成的字符串,每个字符串之间用空格隔开。外层循环使用一个变量当做循环计数器,每循环一次,变量值减一。请将下列程序补充完整。
Dim Words,Chars,MyString
Flor Words=10 T0 1 Step -1
ForChars=0 To 9
MyString=______
Next Chars
MyString=______
Next Words
[填空题]字符串str由数字字符组成(长度不超过5个字符),可看作任意进制的数,请补充函数fun( ),该函数的功能是:把 str字符串转换成任意进制的数,结果保存在数组xx中,由函数返回转换后数组腆的实际长度。其中x表示str原来的进制, y表示要转换成的进制。例如,输入str=“1111”,x=2,y=10,结果输出:15。如果输入str=“15”, x=10,Y=2,结果输出: 1111。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun( )的横线上填入所编写的若干表达式或语句。
试题程序:
#include <stdio.h>
#include<stdlib.h>
#include<string.h>
#define N 8
int xx[N];
int fun(char *str,int x,int y)
{
int sum;
int i=0;
char *p=str;
for(i=0; i<N; i++)
xx[i]=0;
sum=*p-’0’;
p++;
while (*p)
{
sum= 【1】 ;
p++;
}
i=0;
while(sum!=0)
{
xx[i]= 【2】 ;
【3】 ;
i++;
}
return i;
}
main ( )
{
char str[6];
int i;
int n;
int x;
int y;
printf("Enter a string made up of ’0’ to
’9’ digits character:");
gets(str);
if(strlen (str) >5)
{
printf("Error:string too longer!,
please input again!/n/n");
exit(0);
}
for(i=0;str[i];i++)
[填空题]请补充main函数,该函数的功能是:把一个字符串中的所有小写字母字符全部转换成大写字母字符,其他字符不变,结果保存原来的字符串中。
例如:当str[N]“123 abcdef ABCDEF!”,结果输出:
“123ABCDEFABCDEF!”。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun的横线上填入所编写的若干表达式或语句。
试题程序:
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#define N 80
void main( )
int j;
char str[N]="123abcdef ABCDEF!";
char *pf=str;
clrscr( );
printf("*** original string ***/n");
puts(str);
【1】 ;
while(*(pf+j)).
if(*(pf+j)>=’a’&&* (pf+j)<=’z’)
*(pf+j)= 【2】 ;
j++;
else
【3】 ;
printf("****** new string ******/n");
puts(str);
system("pause");
[填空题]字符串str由数字字符‘0’和‘1’组成(长度不超过8个字符),可看作二进制数,请补充函数fun( ),该函数的功能是:把str字符串转换成十进制数,结果由函数返回。例如,输入“1001”,结果输出:9。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun( )的横线上填入所编写的若干表达式或语句。
试题程序:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int fun(char *str)
int n;
char *p=str;
【1】 ;
p++;
while (*p)
n= 【2】 ;
p++;
return 【3】 ;
main( )
char str[9];
int i;
int n;
printf ("Enter a string made up of ’0’ and
’1’ digital character:");
gets (str);
if (strlen(str)>8)
printf ("Error:string too longer!
please input again !/n/n");
exit(0);
for(i=0;str[i];i++)
if(str[i]<’0’||str[i]>’1’)
printf("Error:%c not is ’0’and
’1’ digital character !/n/n",
str[i]);
exit(0);
printf("The orig
[简答题]填空题
请补充main函数,该函数的功能是:把一个字符串中的所有小写字母字符全部转换成大写字母字符,其他字符不变,结果保存原来的字符串中。
例如:当str[N]=“123 abcdef ABCDEF!”,结果输出:“123 ABCDEF ABCDEF!”。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun的横线上填入所编写的若干表达式或语句。
试题程序:
#include
#include
#include
#define N 80
void main( )
{
int j;
char str[N]=" 123abcdef ABCDEF!";
char *pf=str;
clrscr( );
printf("***original string ***/n");
puts(str);
【1】;
while(*(pf+j))
{
if(*(pf+j)>=’’a’’&&*(pf+j)<=’’z’’)
{
*(pf+j)=【2】;
j++;
}
else
【3】;
}
printf("******new string******/n");
puts(str);
system("pause");
}
[简答题]【说明】StringEditor类的功能是:已知一个字符串,返回将字符串中的非字母字符都删除后的字符串。
public (1) {
public static String removeNonLetters( (2) ){
StringBuffer aBuffer= (3) ;
char aCharacter;
for(int i=0; i<original.length( );i++){
aCharacter= (4) ;
if(Character.isLetter(aCharacter))
aBuffer.append( (5) );
}
return new String(aBuffer);
}
}
public class StringEditorTester{
public static void main(String args[]){
String original="Hi!, My Name is Mark, 234I think you are my classmate!!";
System.out.println(StringEditor.removeNonLetters(original));
}
}
[单项选择]在7位ASCⅡ码中,除了表示数字、英文大小写字母外,还有( )个字符和信号。
A. 63
B. 66
C. 80
D. 32
[单项选择]返回一个由字符表达式的第1个字符重复组成的指定长度为数值表达式值的字符串的函数为
A. Space
B. Striog
C. Left
D. Right
[简答题]
软件规格说明:文件名的第一个字符必须是A或B,第二个字符必须是数字。满足则修改文件。若第一个字符不为A或B,打印错误信息X12,若第二个字符不为数字,则打印错误信息X13。
根据软件规格说明的描述,画出因果图。