登录
首页
笔记
分类
Toggle navigation
更多 >
-
hot
JAVA题库
new
BASIC题库
您所在的当前位置:
计算机等级考试题库
>
JAVA题库
>
[填空题] 以下程序运行后输入:3,abcde<回车>,则输出的结果是______。 #include "stdio.h" #include "string.h" void move(char *str,int n) char temp; int i; temp=str[0]; for (i=0;i<=n-1;i++) str[i]=str[i+1]; str[n-1]=temp; void main() char s[50]; int n, i, z, scanf("%d,%s",&n,s); z=strlen(s); move(s,z); printf("%s ",s);
问题:
发布时间:2022-07-01
[填空题] 以下程序运行后输入:3,abcde<回车>,则输出的结果是______。
#include "stdio.h"
#include "string.h"
void move(char *str,int n)
char temp;
int i;
temp=str[0];
for (i=0;i<=n-1;i++)
str[i]=str[i+1];
str[n-1]=temp;
void main()
char s[50];
int n, i, z,
scanf("%d,%s",&n,s);
z=strlen(s);
move(s,z);
printf("%s ",s);
参考答案:
题目声明
提问用户:i4***eBL
答案有错?我要纠错
查看答案(免费不限制)
提交纠错答案
可能感兴趣的题目:
1
[填空题] 关系表达式X≤-5或X≥5所对应的布尔表达式是 (12) 。
2
[单项选择题] 下列正确的Visual Basic注释语句是 A.Dim a(10) As Integer Rem这是一个VB程序 B.这是一个VB程序Private Sub Command1_Click()… C.a=1:b=2:_Rem这是一个VB程序:c=3 D.If Shift=6 And Button=2 ThenPrint"BBBB" Rem 这是一个VB程序End If
3
[填空题] 数据库保护分为:安全性控制 【5】 并发性控制和数据的恢复。
4
[填空题] 下列程序计算Sn的值。Sn=a+aa+aaa+…+aaa…a,其中最后一项为n个。 例如:a=5,n=4时,则Sn=5+55+555+5555。请在空白处填入适当的内容,将程序补充完整。 Private Sub Command1_Click() Dim a As Integer,n As Integer,Cout As Integer Dim Sn As Long,Tn As Long Cout=1 Sn=0 Tn=0 a=InputBox("请输入a的值:") n=InputBox("请输入n的值!") DO Tn=Tn*10+a Sn=Sn+Tn Cout=Cout+1 ______ Debug.Print a,n,Sn End Sub
5
[单项选择题] 设在窗体上有一个文本框,然后编写如下的事件过程: Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Intcger) Const Alt=4 Const Key_f2=&H71 altdown%=(Shift And Alt) > 0 f2down% And f2down% Then If altdown% And f2down% Then Text ="abl" End If Ead Sub 程序运行后,清除文本框中原有内容,如果按Shift+F2键,则在文本框中显示的是 A.Alt+F2 B.abl C.随机出儿个数 D.不发生变化
6
[单项选择题] 以下能够触发水平滚动条Change事件的操作是 ( ) A.滚动条失去焦点 B.滚动条获得焦点 C.设置滚动条的焦点 D.单击滚动条左端或右端的箭头
7
[单项选择题] 将E-R图转换到关系模式时,实体与实体间的联系可以表示成( )。 A.属性 B.关系 C.键 D.域
8
[单项选择题] 设已经在“菜单编辑器”中设计了窗体的快捷菜单,其顶级菜单为Bs,取消其“可见”属性,运行时,在以下事件过程中,可以使快捷菜单响应鼠标右键菜单的是( )。 A.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,- X As Single,Y As Single) If Button=2 Then PopupMenu Bs,2 End Sub B.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,- X As Single,Y As Single) PopupMenu Bs End Sub C.Private Sub FOrm_MouseDown(Button As Integer,Shift As Integer,- X As Single,Y As Single) PopupMenu Bs,0 End Sub D.Private Sub Form_MouseDown(Button As Integer,Shin As Integer,- X As Single,Y As Single) If(Button=vbLeftButton)Or(Button=vbRightButton)Then PopupMenu Bs End Sub
9
[单项选择题] 下列有关基于Swing的Applet用户界面说法不正确的是( )。 A. 在需要自定义Swing构件的时候,首先要确定使用哪种构件类作为所定制构件的父类 B. paintComponent( )方法位于JComponent类内,该方法与paint( )方法类似,也要求一个Graphics类的实例为参数 C. 无论在系统开始执行还是窗口被覆盖后需要重新绘制时,paintComponent( )方法都会被系统自动调用,所以在程序中不要调用它,否则会与自动化过程相冲突 D. 如果需要重新绘制Applet,就调用方法paintComponent( )
10
[填空题] 设有下列二叉树: 对此二叉树前序遍历的结果为 【4】