若有宏定义:#define N 2#define Y(n) ((N+1) *n)则表达式2* (N+Y(5+1))的值是 。
查看答案
下列 类型函数不适合声明为内联函数。
A. 函数体语句简单
B. 函数体语句较少
C. 函数执行时间较短
D. 函数执行时间过长
下面程序执行后的输出结果是#include < iostream >using namespace std;#define f(x) (x) * (x)void main(){ int i1,i2; i1=f(8)/f(4); i2=f(4+ 4)/f(2+2); cout<
A. 64,28
B. 4,4
C. 28,28
D. 64,64
写出下列程序的执行结果是:__________________。#includeusing namespace std;void sort( double x,double y );void sort( double x,double y,double z );void main(){ sort( 5.6, 79 );}void sort(double x,double y){ if ( x>y ) cout << x <<","<< y << endl; else cout << y << "," << x << endl;}
写出下列程序的执行结果是:__________________。#includeusing namespace std;int f1( int a, int b ) { return a + b ;}int f2( int a, int b ){ return a - b ;}int f3( int( *t )( int, int ), int a, int b ) { return ( *t )( a, b ) ;}void main(){ int ( *p )( int, int ); p = f1 ; cout << f3( p, 4, 8 ) <<","; p = f2 ; cout << f3( p, 8, 4 );}