网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

程序中头文件typel.h的内容是: #define N 5 #define M1 N*3 程序如下: #include "type1.h” #define M2 N*2 main() { int i; i=M1+M2; printf("%d\n",i);} 程序编译运行后的输出结果是( )

A.10

B.20

C.25

D.30


参考答案

更多 “ 程序中头文件typel.h的内容是: #define N 5 #define M1 N*3 程序如下: #include "type1.h” #define M2 N*2 main() { int i; i=M1+M2; printf("%d\n",i);} 程序编译运行后的输出结果是( )A.10B.20C.25D.30 ” 相关考题
考题 有如下程序: include using namespace std; class TestClass{ int k; public: TestCla 有如下程序:include<iostream>using namespace std;class TestClass{int k;public:TestClass(int x=1):k(x){}~TestClass O{cout<<k;}};int main(){TestClass a[]={TestClass(3),TestClass(3),TestClass(3)};TestClass *p=new TestClass[2];delete []p;return ():}这个程序的输出结果是______。

考题 有如下程序 include include using namespace std; int main( 有如下程序 #include<iostream> #include<iomanip> using namespace std; int main(){ cout<<setprecision(3)<<fixed<<setfill('*')<<setw(8); cout<<12.345<<_______<<34.567; return 0; } 若程序的输出是: ** 12.345**34.567 则程序中下划线处遗漏的操作符是A.setprecision(3)B.fixedC.setfill('*')D.setw(8)

考题 有如下程序: include using namespace std; class Sample{ public: 有如下程序: #include<iostream> using namespace std; class Sample{ public: Sample()<) ~Sample(){cout<<'*';} }; int main(){ Sample temp[2],*pTemp[2]; return 0; } 执行这个程序输出星号(*)的个数为( )。A.1B.2C.3D.4

考题 有如下程序includemain(){FILE*fpl; fpl=fopen("f1.txt","w"); fprintf(fp1,"abc"); f 有如下程序 #include<stdio.h> main() { FILE *fpl; fpl=fopen("f1.txt","w"); fprintf(fp1,"abc"); fclose(fp1); } 若文本文件f1.txt中原有内容为:good,则运行以上程序后文件f1.txt中的内容为A.goodabcB.abcdC.abcD.abcgood

考题 执行如下程序后的输出结果是【】。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");

考题 有如下程序:include include using namespace std;int main(){cout.fill(' 有如下程序:#include <iostream>#include <iomanip>using namespace std;int main(){cout.fill('*');cout<<left<<setw(4)<<123<< "OK"<<end1;return 0;}执行这个程序的输出结果是( )。A.123*OKB.123*OK**C.*123OKD.*123**OK

考题 程序中头文件type1.h的内容是( )。 #define N 5 #define M1 N*3 程序如下: #define "type1.h" #define M2 N*2 main() { int i; i=M1+M2; printf("%d\n",i); } 程序编译后运行的输出结果是( )。A.10B.20C.25D.30

考题 程序中头文件type1.h 的内容是#define N 5#define M1 N*3程序如下:#define "type1.h"#define M2 N*2main (){ int i; i=M1+M2; printf("%d\n", i);) 程序编译后运行的输出结果是( )。A.10B.20C.25D.30

考题 有如下程序:include main(){ FILE*fp1;fp1=fopen("f1.txt","w");fprintf(fp1, "abc"); 有如下程序: #include <stdio.h> main() { FILE *fp1; fp1=fopen("f1.txt","w"); fprintf(fp1, "abc"); fclose(fp1); } 若文本文件f1.txt中原有内容为good,则运行以上程序后文件f1.txt中的内容为( )。A.goodabcB.abcdC.abcD.abcgood

考题 有如下程序: include using namespace std; class PARENT { public: PARENT() { cout 有如下程序:include <iostream>using namespace std;class PARENT{public:PARENT() { cout <<"PARENT"; }};class SON : public PARENT{public:SON() {cout << "SON"; }};int main(){SON son;PARENT *p;p = son;return 0;}执行上面程序的输出是______。

考题 有如下程序#include〈stdio.h〉main(){FILE *fp1;fp1=fopen("f1.txt","w");fprintf(fp1,"abc");fclose(fp1);}若文本文件f1.txt中原有内容为:good,则运行以上程序后文件f1.txt中的内容为A.goodabcB.abcdC.abcD.abcgood

考题 程序中头文件typel.h的内容是: #define N 5 #define M1 N *3 程序如下: #include“typel.h” #define M2 N*2 main() { int i; i=M1+M2;Printf(“%d\n”,0; } 程序编译后运行的输出结果是:A.10B.20C.25D.30

考题 有如下的程序: include using namespace std; class AT{friend ostream operato 有如下的程序:include<iostream>using namespace std;class AT{friend ostream operator<<(ostream,AT);}at;ostream operator<<(ostream os,AT){return os<<'@';}int main(){cout<<"MyHome"<<at<<"isHere.com";}执行上面的程序将输出

考题 有如下程序:includemain(){int x=23; do {Printf("%d",x--);} while(! x);}该程序的执 有如下程序: #include <stdio.h> main() { int x=23; do { Printf("%d",x--);} while(! x); } 该程序的执行结果是( )。A.321B.23C.不输出任何内容D.陷入死循环

考题 有如下程序includemain(){FILE*fp1;fp1;fopen("ftxt","w");fprintf(fpl, "abc")fclose 有如下程序 #include <stdio.h> main() { FILE *fp1; fp1;fopen("ftxt","w"); fprintf(fpl, "abc") fclose(fpl); } 若文本文件f1.txt中原有内容为:good,则运行以上:程序后文件f1.Mt中的内容为A.goodabcB.abcdC.abcD.abcgood

考题 如下程序的执行结果是 include void main( ) { static int a[ ]={ 1,7,3,9,5,11 如下程序的执行结果是 #include<iostream.h> void main( ) { static int a[ ]={ 1,7,3,9,5,11 }; int * p=a; * (p+3)+=4; cout < < * p < <"," < < * (p+3);}A.1,13B.1,16C.3,13D.1,14

考题 有如下程序: include using namespaee std; class A{ public: A( ){cout 有如下程序:include<iostream>using namespaee std;class A{public:A( ){cout<<"A";}~A( ){cout<<"A";}};class B{A a;public:B( ){cout<<"B";}~B( )t cout<<"B";}};int main( ){B b;return 0;}程序的输出结果是______。

考题 有如下程序: include include using namespace std; int ma 有如下程序: #include <iostream> #include <iomanip> using namespace std; int main() { cout.fill('*'); cout << left << setw(4) << 123 << "OK" << endl; return 0; }A.123*OKB.123*OK**C.*123OKD.*123**OK

考题 程序中头文件typel.h的内容是 #define N 5 #define M1 N*3 #define "typel .h" #define M2 N*2 main ( ) { int i; i=M1+M2; printf ("%d\n", i ); } 程序编译后运行的输出结果是A.10B.20C.25D.30

考题 有如下程序: include include using namespace std; int main() {cout.f 有如下程序: #include <iostream> #include <iomanip> using namespace std; int main() { cout.fill('*'); cout.width(6); cout.fill('#'); cout<<123<<end1; return 0; } 执行生的输出结果是( )。A. ###123B.123###C. ***123D.123***

考题 有如下程序: include main ( ){FILE* fpl;fp1 = fopen("ftxt" ,"w");fpfinff( fp1 ," 有如下程序: #include <stdio.h> main ( ) { FILE* fpl; fp1 = fopen("ftxt" ,"w"); fpfinff( fp1 ," abc" ); fclose ( fp1 ); 若文本文件f1.txt中原有内容为:good,则运行以上程序后文件f1.txt中的内容为( )。A.goodabcB.abcdC.abcD.abegood

考题 如下程序的运行结果是______。 include main() { int x=y=3,z=1; printf ("%d%d\n",(++ 如下程序的运行结果是______。 #include<stdio.h> main() { int x=y=3,z=1; printf ("%d%d\n",(++x,y++),z+2); }A.3 4B.4 2C.4 3D.3 3

考题 下面程序的文件名为t.exe,在DOS下输入的命令行参数如下:t to meet me则程序输出的结果是i 下面程序的文件名为t.exe,在DOS下输入的命令行参数如下:t to meet me<回车> 则程序输出的结果是 #include"stdio.h" main(argc,argv) int argc;char*argv[]; { int i; printf("%d\n",argc);}A.3B.4C.2D.以上答案都不正确

考题 对于如下程序:  #include    main( )  {    FILE *fp;    fp=fopen(“file.txt”,“w”);    fprintf(fp,“%s”,“xyz”);    fclose(fp);  }  若文件file.txt中原有的内容为good,则运行该程序以后,文件file.txt中的内容为()

考题 单选题有如下程序:#include #include main(){ char a[]=THIS, *b=OK; printf(%d,%d,%d,%d, strlen(a), sizeof(a), strlen(b), sizeof(b));}程序运行后的输出结果是(  )。A 4,5,2,4B 4,4,2,1C 5,5,3,3D 4,5,2,3

考题 填空题对于如下程序:  #include    main( )  {    FILE *fp;    fp=fopen(“file.txt”,“w”);    fprintf(fp,“%s”,“xyz”);    fclose(fp);  }  若文件file.txt中原有的内容为good,则运行该程序以后,文件file.txt中的内容为()

考题 单选题有如下程序:#include #include main(){ printf(%d,strlen(0\tA011\1));}程序运行后的输出结果是(  )。A 8B 9C 7D 10