题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-02-21 02:18:27

[填空题]

下面程序运行时输出结果为
C:/Program Files is a directory.
请将程序补充完整。
import java.io.*;
public class DirTest {
public static void main(String[] args) {
File myDir = new File("C:/Program Files/");
System.out.println
(myDir+( 【11】 .isDirectory( )"is": "is not") +" a directory.");
}
}


更多"下面程序运行时输出结果为 C:/Program Files is a "的相关试题:

[填空题]若下面程序运行时输出结果为: 1,A,10.1 2,B,3.5 请将程序补充完整。 #include<iostream> using namespace std; int main( ) { void test(int, char,double______); test(1, ’A’, 10.1); test(2, ’B’); return 0; } void test(int a, char b, double c) { cout<<a<<’,’<<b<<’,’<<c<<end1; }
[填空题]若下面程序运行时输出结果为:
1,A,10.1
2,B,3.5
请将程序补充完整。
#include<iostream>
using namespace std;
int main( )

void test(int, char,double______);
test(1, ’A’, 10.1);
test(2, ’B’);
return 0;

void test(int a, char b, double c)

cout<<a<<’,’<<b<<’,’<<c<<end1;

[填空题]下面程序运行时输出结果为 【8】 。 #include<iostream.h> #include<malloc.h> class Rect { public: Rect(int1,int w)(length=1;width=w;) void Print( ){cout<<"Area:"<<length *width<<endl;) void *operator new(size-t size){return malloc(size);} void operator delete(void *p){free(p) private: int length,width; }; void main( ) { Rect*p; p=new Rect(5,4); p->Print( ); delete p; }
[填空题]下面程序运行时输出结果为______。
#include<iostream.h>
#include
class Rect
{
public:
Rect(int l, int w){length=l; width=w;)
void Print( ){cout<<"Area:"<<length*width<<end1;}
void operator delete(void*p){free(p);}
private:
int length, width;
};
void main( )
{
Rect *p;
p=new Rect(5, 4);
p->Print( );
delete p;
}
[填空题]下面程序运行时输出结果为______。
#include<iostream.h>
#include
class Rect

public:
Rect(int l, int w)length=l; width=w;)
void Print( )cout<<"Area:"<<length*width<<end1;
void operator delete(void*p)free(p);
private:
int length, width;
;
void main( )

Rect *p;
p=new Rect(5, 4);
p->Print( );
delete p;

[填空题]若下列程序运行时输出结果为 1,A,10.1 2,B,3.5 请将程序补充完整。 #include<iostream> using namespace std; int main( ) { void test(int,char,double______); test(1,’A’,10.1); test(2,’B’); return 0; } void test(int a,char b,double c) { cout<<a<<’,’<<b<<’,’<<c<<end1; }
[填空题]若下面程序运行时输出结果为 1,A,10.1 2,B,3.5 #include <iostream> using namespace std; int main( ) { void test(int, char, doubie 【8】 ); test(1, ’A’, 10.1 ); test(2, ’B’); return 0; } void test(int a, char b, double c) { cout<<a<<’,’<<b<<’,’<<c<<endl; }
[单项选择]下面程序运行时,若输入395,则输出结果是( )
Private Sub Command1_Click( )
Dim x%
x=InputBox("请输入一个3位整数")
Print x Mod 10,x/100,(X Mod 100)/10
End Sub
A. 3 9 5
B. 5 3 9
C. 5 9 3
D. 3 5 9
[填空题]下面程序的输出结果为:Base::fun,请将程序补充完整。 #include<iostream.h> class Base{ public: 【12】 fun( ){cout<<"Base::fun"<<end1;} }; class Derived:public Base{ public: 【13】 fun( ){cout<<"Derived::fun"<<end1;} }; int main( ) { Base a,*pb; Derived b; pb=&b; pb->tim( ); return 0; }
[单项选择]

下面程序运行时,若输入395,则输出结果是()。
Private Sub Command1_Click( )
Dim x%
x=InputBox("请输入一个3位整数")
Print x Mod 10,x/100,(x Mod 100)/10
End Sub


A. 3 9 5
B. 5 3 9
C. 5 9 3
D. 3 5 9
[单项选择]如下程序运行时的输出结果是 #include<iostream> using namespace std; class ONE{ int c; public: ONE( ):c(0){eout<<1;} ONE(int n):C(n){cout<<2;} }; class TW0{ ONE onel; ONE one2; public: TWO(int m):one2(m){eout<<3;} }; int main( ){ TWO t(4); return 0; }
A. 3
B. 23
C. 123
D. 213
[单项选择]如下程序运行时的输出结果是
#include<iostream>
using namespace std;
class ONE
int c;
public:
ONE( ):c(0)eout<<1;
ONE(int n):C(n)cout<<2;

class TW0
ONE onel;
ONE one2;
public:
TWO(int m):one2(m)eout<<3;

int main( )
TWO t(4);
return 0;

A. 3
B. 23
C. 123
D. 213
[简答题]给出下面程序输出结果。
#include<iostream.h>
class Base
private:
int Y;
public:
Base(int y=0)y=y;cout<<"Base("<<y<<")/n";
~Base( )cout<<"~Base( )/n";
void print( )cout<<Y<<" ";

class Derived:public Base
private:
int Z;
public:
Derived(int y,int z):Base(y)
Z=z;
cout<<"Derived("<<y<<","<<z<<")/n";

~Derived( )cout<<"~Derived( )/n";
void print( )
Base::print( );
cout<<Z<<endl;


void main( )
Derived d(10,20);
d.print( );

[单项选择]给出下面程序输出结果。
#include<iostream.h>
void main( )
int *p1;
int**p2=&p1;
int b=20;
p1=&b;
cout<<**p2<<endl;

[填空题]在下面的程序运行时,如果从键盘上输入1298并回车,则输出结果为 [7] 。 # include <iostream. h>   void main( ) { int n1, n2; cin>>n2; while (n2!=0) { n1=n2%10; n2=n1/10; cout<<rd<< "," } }

我来回答:

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

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码