• 2022-06-06 问题

    To read the entire remaining contents of the file as a string from a file object infile, which one should be used ? ( ) A: infile.read(2) B: infile.readline() C: infile.readlines() D: infile.read()

    To read the entire remaining contents of the file as a string from a file object infile, which one should be used ? ( ) A: infile.read(2) B: infile.readline() C: infile.readlines() D: infile.read()

  • 2022-05-30 问题

    以写的方式打开文件“myfile.dat”的语句是()。 A: ifstrean<br/>infile("myfile.dat",ios::in); B: fstrean<br/>infile("myfile.dat",ios::app); C: fstrean<br/>infile("myfile.dat",ios::out); D: ofstrean<br/>infile("myfile.dat");

    以写的方式打开文件“myfile.dat”的语句是()。 A: ifstrean<br/>infile("myfile.dat",ios::in); B: fstrean<br/>infile("myfile.dat",ios::app); C: fstrean<br/>infile("myfile.dat",ios::out); D: ofstrean<br/>infile("myfile.dat");

  • 2022-07-24 问题

    ‌要求打开文件 d:\file.dat,可写入数据,正确的语句是( )。‍ A: ifstream infile("d:\file.dat", ios::in); B: ifstream infile("d:\\file.dat", ios::in); C: ofstream infile("d:\file.dat", ios::out); D: fstream infile("d:\\file.dat", ios::in| ios::out);

    ‌要求打开文件 d:\file.dat,可写入数据,正确的语句是( )。‍ A: ifstream infile("d:\file.dat", ios::in); B: ifstream infile("d:\\file.dat", ios::in); C: ofstream infile("d:\file.dat", ios::out); D: fstream infile("d:\\file.dat", ios::in| ios::out);

  • 2022-10-26 问题

    要求可打开文件:D:\file.dat 写入数据,错误的语句是? A: ifstream infile("D:\\file.dat", ios::in); B: fstream infile("D:\\file.dat", ios::in | ios::out); C: fstream infile("D:\\file.dat", ios::in); D: ofstream infile("D:\\file.dat", ios::out);

    要求可打开文件:D:\file.dat 写入数据,错误的语句是? A: ifstream infile("D:\\file.dat", ios::in); B: fstream infile("D:\\file.dat", ios::in | ios::out); C: fstream infile("D:\\file.dat", ios::in); D: ofstream infile("D:\\file.dat", ios::out);

  • 2022-10-26 问题

    要求可打开文件:D:?ile.dat 写入数据,错误的语句是? A: ifstream infile(&quot;D:\file.dat&quot;, ios::in); B: fstream infile(&quot;D:\file.dat&quot;, ios::in); C: ofstream infile(&quot;D:\file.dat&quot;, ios::out); D: fstream infile(&quot;D:\file.dat&quot;, ios::in | ios::out);

    要求可打开文件:D:?ile.dat 写入数据,错误的语句是? A: ifstream infile(&quot;D:\file.dat&quot;, ios::in); B: fstream infile(&quot;D:\file.dat&quot;, ios::in); C: ofstream infile(&quot;D:\file.dat&quot;, ios::out); D: fstream infile(&quot;D:\file.dat&quot;, ios::in | ios::out);

  • 2022-10-26 问题

    要求打开文件 d:?ile.dat,可写入数据,正确的语句是( )。 A: ifstream infile(&quot;d:?ile.dat&quot;, ios::in); B: ifstream infile(&quot;d:\file.dat&quot;, ios::in); C: ofstream infile(&quot;d:?ile.dat&quot;, ios::out); D: fstream infile(&quot;d:\file.dat&quot;, ios::in| ios::out);

    要求打开文件 d:?ile.dat,可写入数据,正确的语句是( )。 A: ifstream infile(&quot;d:?ile.dat&quot;, ios::in); B: ifstream infile(&quot;d:\file.dat&quot;, ios::in); C: ofstream infile(&quot;d:?ile.dat&quot;, ios::out); D: fstream infile(&quot;d:\file.dat&quot;, ios::in| ios::out);

  • 2022-10-26 问题

    要求打开文件"d:\file.dat",可写入数据,正确的语句是要求打开文件"d:\file.dat",可写入数据,正确的语句是要求打开文件"d:\file.dat",可写入数据,正确的语句是 A: ifstream infile("d:\file.dat", ios::in);ifstream infile("d:\file.dat", ios::in); B: ifstream infile("d:\\file.dat", ios::in); C: ofstream infile("d:\file.dat", ios::out); D: fstream infile("d:\\file.dat", ios::in|ios::out);

    要求打开文件"d:\file.dat",可写入数据,正确的语句是要求打开文件"d:\file.dat",可写入数据,正确的语句是要求打开文件"d:\file.dat",可写入数据,正确的语句是 A: ifstream infile("d:\file.dat", ios::in);ifstream infile("d:\file.dat", ios::in); B: ifstream infile("d:\\file.dat", ios::in); C: ofstream infile("d:\file.dat", ios::out); D: fstream infile("d:\\file.dat", ios::in|ios::out);

  • 2022-05-30 问题

    要求打开文件f:\myfile.dat,并能够写入数据,正确的语句是( )。 A: ifstream infile("f:\\myfile.dat", ios::in); B: ifstream infile("f:\\myfile.dat ", ios::out); C: ofstream outfile("f:\\myfile.dat ", ios::in); D: fstream infile("f:\\myfile.dat ", ios::in | ios::out);

    要求打开文件f:\myfile.dat,并能够写入数据,正确的语句是( )。 A: ifstream infile("f:\\myfile.dat", ios::in); B: ifstream infile("f:\\myfile.dat ", ios::out); C: ofstream outfile("f:\\myfile.dat ", ios::in); D: fstream infile("f:\\myfile.dat ", ios::in | ios::out);

  • 2022-05-30 问题

    要求打开文件f:\myfile。dat,并能够写入数据,正确的语句是( )。 A: ofstream outfile(&quot;f:\\myfile.dat &quot;, ios::in); B: ifstream infile(&quot;f:\\myfile.dat&quot;, ios::in); C: fstream infile(&quot;f:\\myfile.dat &quot;, ios::in | ios::out); D: ifstream infile(&quot;f:\\myfile.dat &quot;, ios::out);

    要求打开文件f:\myfile。dat,并能够写入数据,正确的语句是( )。 A: ofstream outfile(&quot;f:\\myfile.dat &quot;, ios::in); B: ifstream infile(&quot;f:\\myfile.dat&quot;, ios::in); C: fstream infile(&quot;f:\\myfile.dat &quot;, ios::in | ios::out); D: ifstream infile(&quot;f:\\myfile.dat &quot;, ios::out);

  • 2021-04-14 问题

    阅读以下程序,对程序功能的描述中正确的是 #icnlude int main() { FILE *in, *out; char ch, infile[10], outfile[10]; printf("Enter the infile name:"); scanf("%s", infile); printf("Enter the outfile name:"); scanf("%s", outfile); if ((in = fopen(infile, "r")) == NULL) { printf("cannot open infile."); exit(0); } if ((out = fopen(outfile, "w")) == NULL) { printf("cannot open outfile."); exit(0); } while (!feof(in)) { fputc(fgetc(in), out); } fclose(in); fclose(out); return 0; }

    阅读以下程序,对程序功能的描述中正确的是 #icnlude int main() { FILE *in, *out; char ch, infile[10], outfile[10]; printf("Enter the infile name:"); scanf("%s", infile); printf("Enter the outfile name:"); scanf("%s", outfile); if ((in = fopen(infile, "r")) == NULL) { printf("cannot open infile."); exit(0); } if ((out = fopen(outfile, "w")) == NULL) { printf("cannot open outfile."); exit(0); } while (!feof(in)) { fputc(fgetc(in), out); } fclose(in); fclose(out); return 0; }

  • 1 2 3 4 5 6 7 8 9 10