首页 > 考研
题目内容 (请给出正确答案)
[主观题]

写出下列程序的运行结果。#include “stdio.h”Main(){ int a()={1,2,3,-4,5};int m,n,*p; p=&a; m=*(p+1); n=*(p+4);printf(“%d %d %d ”,*p,m,n); }

写出下列程序的运行结果。#include “stdio.h”Main(){ int a()={1,2,3,-4,5};int m,n,*p; p=&a; m=*(p+1); n=*(p+4);printf(“%d %d %d ”,*p,m,n); }
答案
收藏

1 2 5

如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“写出下列程序的运行结果。#include “stdio.h”…”相关的问题
第1题
写出下列程序的运行结果。#include void Fun(){int num=20;cout<< "The Fun's num i
写出下列程序的运行结果。#include void Fun(){int num=20;cout<< "The Fun's num i

写出下列程序的运行结果。

#include void Fun(){int num=20;cout<< "The Fun's num is"<< num<< endl;

}void main(){int num=10;cout<< "The main's num is "<< num<< endl;Fun();{int num=30;

cout<< "The Field's num is "<< num<< endl;}cout<< "The main's num is "<< num<< endl;}

点击查看答案
第2题
阅读下列程序,则在执行后,程序的运行结果为#include"stdio.h"#include"string.h"main(){ char a[

阅读下列程序,则在执行后,程序的运行结果为 #include"stdio.h" #include"string.h" main() { char a[30]="nice to meet you!"; strcpy(a+strlen(a)/2,"you"); printf("%s\n",a);}

A.nice to meet you you

B.nice to

C.meet you you

D.nice to you

点击查看答案
第3题
下列程序的运行结果为【 】。 include <stdio.h> main() { static char str1[40];

下列程序的运行结果为【 】。 include <stdio.h> main() { static char str1[40]; char str2140]; strcpy(str2,"China"); strcat(str1,str2); strcat(str1," is a great country !"); printf("%s %s ",str2,strl); printf("%d %d\n",strlen(str2),strlen(str1)); }

点击查看答案
第4题
写出下列程序的运行结果()

A.15,100.1,10

B.10,101,-70

C.15,100.3,10

D.10,100.1,10

点击查看答案
第5题
阅读下列程序,写出运行结果()

A.程序运行后,输入:8

B.运行结果是

点击查看答案
第6题
阅读下列程序,写出运行结果()

A.运行结果是

B.5

C.4

D.7

E.3

点击查看答案
第7题
描述程序功能并写出程序执行结果:#includemian(){inta=[3][3]={1,3,5,7,9,11,13,15,17},sum=0,i,for(i=0;i<3;j++)if(i==j)sum=sum+a[j];printf(“sum=%d\n”,sum);}

点击查看答案
第8题
下列程序正确的运行结果为()#include<stdio.h>main(){int a[]={2,6,8,10,14,18);int *ptr[-]={&a[0],&a[1],&a[2],&a[3],&a[4]);int i;for(i=0;i<5;i++)a[i]=a[i]/2+a[i]printf("%d\n",*(*(ptr+2)));printf("%d\n",*(*ptr));}

A.1221

B.2112

C.123

D.312

点击查看答案
第9题
阅读下列程序,请写出程序的运行结果。import java.applet.*;import javax.swing.*;import java

阅读下列程序,请写出程序的运行结果。

import java.applet.*;

import javax.swing.*;

import java.awt.event.*;

public class C extends Applet implements ActionListener

{

int n=0;

JButton button;

public void init()

{

setSize(400,100);

button=new JButton("");

add(button);

button.addActionListener(this);

}

public void actionPerformed(ActionEvent e)

{

n++;

button.setText(n+"");

}

}

点击查看答案
第10题
阅读下列程序,则运行结果为 #include"stdio.h" fun() { static int x=5; x++; return x;} main() { int i,x; for(i=0;i<3;i++) x=fun(); printf("%d\n",x);}

A.5

B.6

C.7

D.8

点击查看答案
第11题
分析下列程序段,写出程序运行结果()s=1for n=1 to 3s=s+nprint snext

A.1 4 7

B.4 7 10

C.2 4 6

D.2 4 7

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改