网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有如下的程序: include include using namespace std; int main() { ofstr
有如下的程序:
include <iostream>
include <fstream>
using namespace std;
int main()
{
ofstream outf("D:\\temp.txt",ios_base::trunc) ;
outf<<"World Wide Web";
outf.close();
ifstream inf("D:\\temp.txt");
char s[20];
inf>>s;
inf.close();
cout<<s;
return 0;
}
执行后的输出结果是【 】。
参考答案
更多 “ 有如下的程序: include include using namespace std; int main() { ofstr 有如下的程序:include <iostream>include <fstream>using namespace std;int main(){ofstream outf("D:\\temp.txt",ios_base::trunc) ;outf<<"World Wide Web";outf.close();ifstream inf("D:\\temp.txt");char s[20];inf>>s;inf.close();cout<<s;return 0;}执行后的输出结果是【 】。 ” 相关考题
考题
执行如下程序后的输出结果是【】。include include using namespace std;int ma
执行如下程序后的输出结果是【 】。include <iostream>include <fstream>using namespace std;int main ( ){char s[25];ofstream fl("data.txt");f1<<"C++ Programming";f1.close ();ifstream f2 ("data.txt");
考题
有如下程序:includevoid fun(intx, int y){int t=x; x=y; y=t;}int main(){int
有如下程序: #include<iostream> void fun(intx, int y){int t=x; x=y; y=t;} int main() { int a[2]={23,42}; fun(a[1],a[0]); std::cout<<a[0]<<","<<a[1]<<std::end1; return 0; } 执行后的输出结果是( )。A.42,42B.23,23C.23,42D.42,23
考题
有如下程序:include void fun (int x,int y){int t=x;x=y;y=t;}int main(){ int
有如下程序: #include <iostream> void fun (int x,int y){int t=x;x=y;y=t;} int main() { int a[2]={23,42}; fun (a[1],a[0]; std::cout<<a[0]<<”,”<<a[1]<<std:: ond1; retum0; }执行后的输出结果是______ 。A.41,41B.23,23C.13,42D.42,23
考题
有如下的程序:includeincludeusing namespace std;int main(){ char s[25]=
有如下的程序:include<iostream>include<fstream>using namespace std;int main(){char s[25]="Programming language";ofstream f1("DATA. TXT");f1<<"C++Programming";f1.close();ifstream f2("DATA.TXT");if(f2.good())f2>>s;f2.close();cout<<s;return 0;}执行上面的程序将输出______。
考题
有如下程序:include void fun(int x, int y){int t=x;x=y;y=t;}int main (){int
有如下程序: #include <iostream> void fun(int x, int y){int t=x;x=y;y=t;} int main () { int a[2]={23,42}; fun(a[1],a[0]); std::cout<<a[0]<<","<<a[1]<<std::endl; return 0; } 执行后的输出结果是A.42,42B.23,23C.23,42D.42,23
考题
如下程序的输出结果是includevoid fun(int x=y;y=t;}int main(){in
如下程序的输出结果是 #include<iostream> void fun(int & X,inty){intt=x;x=y;y=t;} int main( ){ int a[2]={23,42}; fun(a[1],a[0]); std::cout<<a[0]<<","<<a[1]<<std::endl; return 0; }A.42,42B.23,23C.23,42D.42,23
考题
以下程序的执行结果是【】。 include include include int ma
以下程序的执行结果是【 】。include <iostream.h>include <fstream.h>include <stdlib.h>int main(){fstream outfile, infile;outfile.open("D:\\text.dat",ios::out);if(!outfile){cout<<"text.dat can't open"<<end1
考题
以下程序的执行结果是_______。 include include include void
以下程序的执行结果是_______。include<iostream.h>include<fstream.h>include<stdlib.h>void main(){char ch:fstream file:file.open("abc.dat",ios::out1ios::inlios::binary);if(! file){cout<<“abc.dat文件不能打开”<<endl:abort
考题
有以下程序:include include using namespace std;int main ( ){ ofstream
有以下程序: #include <iostream> #include <fstream> using namespace std; int main ( ) { ofstream ofile; char ch; ofile.open ("abc.txt"); cin>>ch; while (ch!='#' ) { cin>>ch; ofile.put(ch);A.程序编译时出错B.abc#C.abcD.#
热门标签
最新试卷