题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-17 09:55:34

[填空题]下列程序用于将源文件中的字母进行大小写转换,请填写while的请句。
#include<iostream.h>
#include<fstream.h>
#include<iomanip.h>
void main( )

char ch;
fstream file1,file2;
char fnl[10],fn2[10];
cout<<“输入源文件名:”;
cin>>fn1;
cout<<“输入目标文件名:”;
cin>>fn2;
ilel.open(fn1,ios::in);
while( )

证(ch)=,a,&&ch<=’z,)
ch=ch-/a/+’A’;
file2.put(ch);

file1.close( );
file2.close( );

更多"下列程序用于将源文件中的字母进行大小写转换,请填写while的请句。 "的相关试题:

[填空题]下列程序用于将源文件中的字母进行大小写转换,请填写while的请句。
#include<iostream.h>
#include<fstream.h>
#include<iomanip.h>
void main( )

char ch;
fstream file1,file2;
char fnl[10],fn2[10];
cout<<“输入源文件名:”;
cin>>fn1;
cout<<“输入目标文件名:”;
cin>>fn2;
ilel.open(fn1,ios::in);
while( )

证(ch)=,a,&&ch<=’z,)
ch=ch-/a/+’A’;
file2.put(ch);

file1.close( );
file2.close( );

[填空题]下列程序用于将源文件中的字母进行大小写转换,请填写while语句。
#include<iostream.h>
#include<fstream.h>
#include<iomanip.h>
void main( )

char ch;
fstream file1,file2;
char fn1[10],fn2[10];
cout<<"输入源文件名:";
cin>>fn1;
cout<<"输入目标文件名:";
cin>>fn2;
file1.open(fn1,ios::in);
while(______)

if(ch>=’a’&&ch<=’z’)
ch=ch=’a’+’A’;
file2.put(ch);

file1.close( );
file2.close( );

[填空题]下列程序用于将源文件中的字母进行大小写转换,while的条件是 【14】
#include<iostream. h>
#include<fstream. h>
#include<iomanip. h>
void main( )

char ch;
fstream filel, file2
char fn1[10], fn2[10];
cout<<"输入源文件名:";
cin>>fn1
cout<<"输入目标文件名:";
tin>>fn2
file1, open(fn1 ,ios: :in);
file2, open(fn2, ios:: out);
while(________)

if(ch>=’a’&&ch<=’z’)
ch=ch-’a’+’A’,
file2, put(ch),

file1, close( ),
file2, close( );

[填空题]下列程序用于将源文件中的字母进行大小写转换,while的条件是______。
#include<iostream.h>
#include<fstream.h>
#include<iomanip.h>
void main( )

char ch;
fstream filel,file2;
char fnl[10],fn2[10];
cout<<"输入源文件名:";
cin>>fn1;
cout<<"输入目标文件名:";
cin>>fn2;
filel.open(fnl,ios::in);
file2.open(fn2,ios::out);
while(______)

if(ch>=’a’&&ch<=’z’)
ch=ch=’a’+’A’;
file2.put(ch);

filel.close( );
file2.close( );

[填空题]下列程序用于将源文件中的字母进行大小写转换,while的条件是 【14】 。 #include<iostream. h> #include<fstream. h> #include<iomanip. h> void main( ) } char ch; fstream filel, file2 char fn1[10], fn2[10]; cout<<"输入源文件名:"; cin>>fn1 cout<<"输入目标文件名:"; tin>>fn2 file1, open(fn1 ,ios: :in); file2, open(fn2, ios:: out); while(________) { if(ch>=’a’&&ch<=’z’) ch=ch-’a’+’A’, file2, put(ch), } file1, close( ), file2, close( ); }
[填空题]Java是区分大小写的。源文件名与程序类名必须相同,其扩展名为 ______,源文件中最多只能有一个 ______ 类,其他类的个数不限。
[填空题]在下面的程序的横线处填上适当的语句,使该程序的输出结果为12。 #include<iostream> using namespace std; class TestClass { public: int a,b; TestClass(int i,int j) { a=i; b=j; } }; class TestClass1:public TestClass { int a; public: TestClass1(int x):TestClass(x,x+1){} void show( ) { ______;∥输出基类数据成员a的值 cout<<b<<endl; } }; int main( ) { TestClass1 d(1); d.show( ); return 0; }
[填空题]在下面程序的横线处填上适当的语句,使程序执行后的输出结果为ABCD。
#include<iostream>
using namespace std;
classA

public:
A( )cout<<’A’;
;
class B:______

public:
B( )cout<<’B’;
;
class C:______

public:C( )cout<<’C’;
;
class D:public B,public C

public:D( )cout<<’D’;
;
void main( )D obj;)
[填空题]在下面程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。
#include<iostream.h>
using namespace std;
class A

public:A( )cout<<‘A’;

class B:______

public:B( )cout<<‘B’;)
;
class C://______

public:C( )cout<<‘C’;
;
class D://public B,public C

public:D( )cout<<‘D’;
;
void main( )D obj;
[单项选择]在下列程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。
#include<iostream>
using namespace std;
class A

public:A( )cout<<‘A’;

Class B:

public:B( )cout<<‘B’;

class C://virtual public A

public:C( )cout<<‘C’;

class D://public B,public D

public:D( )tout<<‘D’;

void main( )D obj;
A. public A
B. private A
C. protected A
D. virtual public A
[单项选择]为使该程序执行结果为10,那么应该在程序划线处填入的语句是( )。 #include<iostream> using namespace std; class MyClass { public: MyClass (int a) { x=a; } ___________ //取x值 private: int x; }; int main( ) { MyClass my(10); cout<<my.GetNum( )<<end1; return 0; }
A. return x;
B. int GetNum(){ return x;}
C. intreturn x;
D. void GetNum(){return x;}
[填空题]以下程序设计功能是:将结构体变量time 中的内容写到文件中。 #include <iostream> using namespace std; struct date { int year; int month; int day; } int main ( ) { date time = { 2005, 1, 1 }; ofstream outdate; outdate.open( "d://date.txt", ios :: binary ); outdate.write(____________, sizeof( tt ) ); outdate.close( ); return 0; } 则程序中空白处应该填入的语句为 【15】

我来回答:

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

订单号:

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