有以下程序,程序运行的结果是 ______。#include<iostrem.h>#include<string.h>void min(); }3 3 B.4 4 C.4 10 D.10 10
A.3 3
B.4 4
C.4 10
D.10 10
A.3 3
B.4 4
C.4 10
D.10 10
include<iostrean.h>
void main(){
int i,a[5];
i=0;
while(i<5){
a[i]=8*(i-2+4*(i>2))%5;
i++;
}
for(i=4;i>=0;i--) cout<<a[i];
}
include <iostream.h>.
include <fstream.h>
include <stdlib.h>
void main()
{
fstream outfile, infile;
outfile.open("data.clat", ios:: out);
if(!outfile)
{
cout<<"Can't open the file."<<end1;
abort();
}
outfile<<" 1234567890"<<end1;
outfile<<"aaaaaaaaa"<<end1;
outfile<<"**********"<<end1;
outfile.close();
infile.open("data. dat ", ios:: in);
if(!infile)
{
cout<<"Can't open the file."<<end1;
abort();
}
char line[80];
int I=0;
while(!infile. eof())
{
I++;
infile.getline(line, sizeof(line));
cout<<I<<":"<<line<<end1;
}
infile.close();
}
A.x=2,y=2
B.x=2,y=3
C.x=3,y=2
D.x=3,y=3
A、A
B、B
C、D
D、E
include <iostream.h>
include <fstream.h>
include <stdlib.h>
int main()
{
fstream filel,file2;
char line[100];
filel.open("source.txt",ios::in);
if(!file1)
{
cout<<"Can't open file source.txt!"<<end1;
abort();
}
file2.open("dest.txt",ios::out);
if(!file2)
{
cout<<"Can't open file dest.txt!"<<end1;
abort();
}
while(!file1.eof())
{
filel.getline(1ine,100);
file2<<line;
file2<<end1;
}
filel.close();
file2.close();
return 0;
}
此程序实现的功能是【 】。
include <fstream>
include <string>
using namespace std;
int main ()
{
char ch[] = "The end";
ofstream outstr("d:\\put.txt", ios_base: :app);
for (int i = 0; i < strlen(ch ); i++ )
outstr.put(ch[i]);
outstr.close();
return 0;
}
程序实现的功能是【 】。
A.12,18,30
B.-12,6,8
C.6,8,10
D.12,-18,16
A、间接调用了D::f() 直接调用了D::g()
B、间接调用了B::f() 间接调用了B::f()
C、间接调用了D::f() 间接调用了B::f()
D、直接调用了D::g() 间接调用了B::g()
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!