更多"设char*strp='CHINA';,执行printf('%s/n'"的相关试题:
[单项选择]设char*s1="12345",*s2="1234";,执行语句printf("%d/n",strlen(strcpy(s1,s2)));后的输出结果是( )
A. 4
B. 5
C. 9
D. 10
[填空题]设char c[5]=’c’,’d’,’/0’,’e’,’/0’);,执行语句printf("%s/n",c );后的结果是______。
[填空题]执行下面程序,第一行输出结果是 【12】 ,第二行输出结果是 【13】 。
Option Explicit
Private Sub Form_Click( )
Dim A As Integer
A=2
Call Sub1 (A)
End Sub
Private Sub1 (x As Integer)
x=x*2+1
If x<10 Then
Call Sub1(x)
End If
x=x,2+1
Print x
End Sub
[填空题]执行下面程序,第一行输出结果是 [11] ,第二行输出结果是 [12] 。
Option Explicit
Private Sub Form_Click( )
Dim A As Integer
A=2
Call Sub1(A)
End Sub
Private Sub1(x As Integer)
x=x*2+1
If x<10 Then
Call Sub1(x)
End If
x=x*2+1
Print x
End Sub
[填空题]下列程序执行输出的结果是 【19】 。
#include<stdio.h>
f(int a)
int b=0;
static c=3;
a=c++,b++;
return(a);
main( )
int a=2,i,k;
for(i=0;i<2;i++)
k=f(a++);
printf("%d/n",k);
[单项选择]以下程序执行后的输出结果是
#include<iostream>
using namcspace std;
void try(int,int,int,int);
int main( )
int x,y,z,r;
x=1;
y=2;
try(x,y,z,r);
cout<<r<<end1;
return 0;
void try(int x,int y, int z,int r)
z = x+y;
x = x*x;
y = y*y;
r = z+x+y;
A. 18
B. 9
C. 10
D. 不确定
[填空题]下列程序执行输出的结果是______。
#include <stdio.h>
f (int a)
{ int b=0;
static c=7;
a=c++; b++;
return (a);
}
main( )
{ int a=2,i,k;
for(i=0;i<2;i++)
k=f(a++);
printf("%d/n", k);
}
[填空题]顺序执行下列两个语句的输出结果是【 】。
[单项选择]下面程序执行后的输出结果为( )。
public class fun
public static void main(String args[])
String greets="How are you!";
String s=greets.substring(0,3);
System.out.println(S);
A. How
B. are.
C. you
D. how ate you!
[单项选择]以下程序执行后的输出结果是 #include<iostream>. using namespace std; void try(int,int,int,int); int main( ) { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }
A. 18
B. 9
C. 10
D. 不确定
[填空题]下列程序执行输出的结果是______。
#include<stdio.h>
f(int A)
{ int b=0;
static c=7;
a=c++;b++;
return(A) ;
}
main( )
{ int a=2,i,k;
for(i=0;i<2;i++)
k=f(a++);
printf("%d/n",k);
}