题目详情
题目详情:
发布时间:2023-09-30 21:39:25

[简答题]请写出下列C语言程序的输出结果是______。 #include<stdlib.h> void fun(float*p1,float*p2,float*s) s=(float*)calloc(1,sizeof(float)); *s=*p1+*p2++; main( ) float a[2]={1.1,2.2},b[2]={10.0,20.0),*s=a; fun(a,b,s); printf("%5.2f/n:,*s);

更多"请写出下列C语言程序的输出结果是______。 #includ"的相关试题:

[简答题]根据下列C语言程序,请写出输出结果。 #include<stdio.h> void swap(int x,int y) { int temp=x; x=y; y=temp; } main( ) { int m=3,n=5; swap(m,n); printf("%d,%d",m,n); }
[单项选择]该程序的输出的结果是

A. 12
B. 13
C. 14
D. 15
[填空题]执行下面程序,第一行输出结果是 ,第二行输出结果是
Option Explicit
Private Sub Form_Click( )
Dim A As Integer
  A=2
  Call Subl(A)
  End Sub
Private Subl(x As Integer)
  x=x*2+1
  If x<10 Then
    Call Subl(x)
  End If
  x=x*2+1
  Print x
End Sub

[单项选择]下面程序输出的结果是什么 ( )
public class Quiz2

public static void main(String args[])

try throw new MyException( );
catch(Exception e)

System.out.println("It’s caught!");
finally
System.out.println("It’s finally caught!");



class MyExeeption extends Exception
A. It’s finally caught!
B. It’s caught!
C. It’s caught!/It’sfinally caught!
D. 无输出
[单项选择]下列程序中,若从键盘中输入的是大写字母C,则程序输出的结果是( )。   Importjava.io.*;   public class Exam{   public static void main(String args[]){   int ch=0;   System.out.println("输入一个字符:");   try{   ch=System.in.read( );   charch_A=’A’,ch_Z=’Z’;   int delta c=(int)ch A+(int)ch Z-ch;   syStem. out.println("编码后的字符为:"+(char)delta_c);   }   catch(IOException e){   e.printStackTrace( );   }   }   }
A. C
B. Y
C. X
D. 字母C的ASCIl码的整型值
[填空题]执行下面程序,第一行输出结果是 【14】 ,第二行输出结果是47。 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
[填空题]执行下面程序,第一行输出结果是 【14】 ,第二行输出结果是47。
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
[简答题]如下程序是为变量i赋值。若程序的输出结果是180。请将程序补充完整。 注意:不改动程序结构,不得增行或删行。 class Base { int i; Base( ) { add(10); } void add(int v) { i+=v; } void print( ) { System.out.println(i); } } class Extension extends Base { Extension( ) { add(______); } void add(int v) { i+=v*2; } } public class ConstructTest3 { public static void main(String args[]) { bogo(new Extension( )); } static void bogo(Base b) { b.add(60); b.print( ); } }
[填空题]下列程序输出结果是 【13】
include <iostream>
using namespace std;
template <typename T>
T fun(T a, T b) return (a<=b)a:b;
int main( )

cout<<fun(3,6)<<’,’<<fim(3.14F, 6.28F)<<end 1;
return 0;

[填空题]以下由C语言编写的程序,运行后输出结果是______。
#include〈stdio.h〉
void fun(int x)
if(x/2>1)fun(x/2):
Printf(“%d”,x):

Main( )
fun(7);printf(“/n”);
[单项选择]如下程序是为变量i赋值。若程序的输出结果是180。请将程序补充完整。
注意:不改动程序结构,不得增行或删行。
class Base

int i;
Base( )

add(10);

void add(int v)

i+=v;

void print( )

System.out.println(i);


class Extension extends Base

Extension( )

add(______);

void add(int v)

i+=v*2;


public class ConstructTest3

public static void main(String args[])

bogo(new Extension( ));

static void bogo(Base b)

b.add(60);
b.print( );


我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码