-
下面程序的运行结果是______。 #include < stdio.h > #include < string.h > main() { char a[7]=\abcdef\,b[4]=\ABC
-
如果在下面程序运行时输入123456,程序的运行结果是【 】。 include<stdio.h>int main(); }
A.12,56
B.12,34
C.34,56
D.123456
-
有以下程序: include <stdio.h> void f(); } 执行后的输出结果【 】。
-
以下程序的运行结果是【 】。 include<stdio.h> main() { int fun(); fun();} fun (
以下程序的运行结果是【 】。 include<stdio.h> main() { int fun(); fun();} fun () { static int a[3]={0,1,2}; int i; for(i=0;i<3;i++)a[i]+=a[i]; for(i=0;i<3;i++)printf("%d,",a[i]); printf("\n");}
-
有以下程序: include<stdio.h> intb=2: intfun(int*k) {b=*k+b;retum(b);} main() {in
有以下程序: include<stdio.h> intb=2: intfun(int*k) {b=*k+b;retum(b);} main() {inta[10]={1,2,3,4,5,6,7,8},i; for(i=2;i<4;i++){b=fun(&a[i])+b;printf(%d.t,b);) printf(\n); } 程序运行后的输出结果是
A.810
B.1028
C.1012
D.1016
-
include<stdio.h>main(); } 程序运行后的输出结果是
A.0,0
B.0,-1
C.-1,-1
D.结果不确定
-
有以下程序 include<stdio.h>void main()
A.10 9 8
B.9 8 7
C.10 9 8 7
D.9 8 7 6
-
下列程序的输出结果是______。 include<stdio.h> main(); }
-
下列程序的运行结果是()。include<stdio.h>define ADD(x) x+x main{ int m=1,n=2,k=3;in
下列程序的运行结果是()。
include<stdio.h>
define ADD(x) x+x
main
{ int m=1,n=2,k=3;
int S=ADD(m+n)*k;
printf("s=%d",s);
}
A.A.sum=18
B.sum=10
C.sum=9
D.sum=25
-
阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。【C++程序】include < stdio. h >include
阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。
【C++程序】
include < stdio. h >
include < string. h >
define Max 1000
class Bank
{
int index;
char date [Max] [10]; // 记录交易日
iht amount[Max]; // 记录每次交易金额,以符号区分存钱和取钱
int rest[ Max]; // 记录每次交易后余额
static iht sum; // 账户累计余额
public:
Bank() {index =0;}
void deposit(char d[ ] , int m) //存入交易
{
strcpy (date [ index ], d);
amount[ index] = m;
(1);
rest[ index] = sum;
index++;
}
void withdraw (char d[ ], int m) //取出交易
{
strcpy(date[ index] ,d);
(2);
(3);
rest[ index] = sum;
index++;
}
void display();
};
int Bank:: sum = 0;
void Bank:: display () //输出流水
{
int i;
printf("日期 存入 取出 余额\n");
for (4)
{
printf(" %8s" ,date[i] );
if (5)
printf(" %6d" , -amount[i] );
else
printf("%6d ",amount[i] );
printf("% 6d\n" ,rest[i] );
} }
void main()
{
Bank object;
object. deposit ("2006.2.5", 1 00 );
object. deposit("2006.3.2" , 200);
object. withdraw("2006.4.1", 50);
object. withdraw("2006.4.5", 80);
object. display ();
}
本程序的执行结果如下:
日期 存入 取出 余额 2006.2.5 100 100
2006.3.2 200 300
2006.4.1 50 250
2006.4.5 80 170
-
有以下程序(strcat函数用以连接两个字符串) include<stdio.h> include<string.h>。
有以下程序(strcat函数用以连接两个字符串) include<stdio.h> include<string.h>。 main {char a[20]="ABCD\oEFG\0",h[]="IJK"; strcat(a,b);printf("%s\n",a); ) 程序运行后的输出结果是()。
A.ABCDE\0FG\0IJK
B.ABCDIJK
C.IJK
D.EFGIJK
-
有以下程序 include<stdio.h>include<string.h>void fun(); } 程序运行后的输出结果是
A.012345
B.876543210
C.876543
D.012345678
-
S=1+12+123+1234+12345 include<stdio.h>int main(); }
-
给出下面程序的运行结果。include<stdio.h>intmain();return0;}
A.6
B.3
C.4
D.5
-
现有如下程序段,则程序段的输出结果为【16】。 include’stdio.h’ intfun()}
-
以下程序的输出为()include<stdio.h>void main(){inty=5;while(y--);printf("y=%d\n",y);}</stdio.h>
A.y=0
B.无限循环,无结果输出
C.y=1
D.y=-1
-
运行程序输入hello↙和world↙,写出输出结果。 include <stdio.h>
-
【单选题】关于编译预处理命令: include<stdio.h>的说明不正确的是()
A.编译程序安装目录下可以找到include文件夹
B.stdio.h是标准输入输出头文件,主要包含输入输出函数
C.这一命令行最后应该加上英文分号,表示结束
D.符号是不可以缺少的
-
有以下程序: include<stdio.h> main() } int y=9; for(y>0;
有以下程序: include<stdio.h> main() } int y=9; for(y>0;y--) if(y%3==0)printf(“%d”,--y); } 程序的运行结果是()。
A.741
B.963
C.852
D.875421
-
有以下程序 include<stdio.h> include<stdio.h> intfun()); } 程序的运行结果是10 B.20 C.0 D.出错
A.10
B.20
C.0
D.出错
-
有一个名为init.txt的文件,内容如下: include<stdio.h>define HDY()
A.编译有错
B.运行出错
C.运行结果y=0
D.运行结果y=6
-
按字母表顺序输出26个大写英文字母。 include "stdio.h" main (); }
-
写出下面程序执行后的运行结果。 include <stdio.h> struct { int a,b; union {int M,N;char ch[10];} in; } Q,*p=&Q; int main() { Q.a=3;Q.b=6; Q.in.M=(*p).a+(*p).b;Q.in.N=p->a*p->b; printf("%d,%d,%d",sizeof(Q.in),Q.in.M,Q.in.N); return 0; }
-
若使用printf输出结果,则必须在程序前添加include <stdio.h>