首页题目详情

有以下程序段typedef struct node { int data; struct node *next; } *NODE;NODE p;以下叙述正确的是

单选题
2019-04-19 20:19:50
01369
 A.A)p是指向struct node结构变量的指针的指针
 B.B)NODE p;语句出错
 C.C)p是指向struct node结构变量的指针
 D.D)p是struct node结构变量
参考答案:……
查看答案
 参考答案
科目:C 程序设计
学科:未分类
感兴趣题目
设有定义:int k=1,m=2; float f=7;,则以下选项中错误的表达式是
(22)若有定义:int x=0, *p=
下列叙述中错误的是
(12)有以下程序#include <iostream>using namespace std;float f1(float n){ return n*n; }float f2(float n){ return 2*n; }int main(int argc, char* argv[]){ float (*p1)(float),(*p2)(float),(*t)(float), y1, y2; p1=f1; p2=f2; y1=p2( p1(2.0) ); t = p1; p1=p2; p2 = t; y2=p2( p1(2.0) ); cout<<y1<<","<<y2<<endl; return 0;}程序运行后的输出结果是
(14)在执行以下程序时,为了使输出结果为:t=4,则给a和b输入的值应满足的条件是#include <iostream>#include <cmath>using namespace std;int main(int argc, char* argv[]){ int s,t,a,b; cin>>a>>b; s=1, t=1; if(a>0) s=s 1; if(a>b) t=s 1; else if (a==b) t=5; else t=2*s; cout<<t ; return 0;}
(39)以下函数值的类型是fun ( float x ){ float y;y= 3*x-4;return y;}
有以下程序#include <iostream>#include <cmath>using namespace std;void sort(int a[], int n){ int i, j ,t; for (i=0; i<n-1;i ) for (j=i 1; j<n;j ) if (a[i]< a[j]){ t= a[i]; a[i]= a[j]; a[j]=t;}}int main(int argc, char* argv[]){ int aa[10]={1,2,3,4,5,6,7,8,9,10}, i; sort(aa 2, 5); for (i=0; i<10; i ) cout<<aa[i] <<","; return 0;}程序运行后的输出结果是
)下列程序执行后的输出结果是 #include <iostream>#include <cmath>using namespace std;void func(int *a,int b[]){ b[0]=*a 6; } int main(int argc, char* argv[]){ int a,b[5]; a=0; b[0]=3; func(
(12)以下程序运行后,输出结果是 main() { char ch[2][5]={"693","825"},*p[2]; int i,j,s=0; for (i=0;i<2;i ) p[i]=ch[i]; for (i=0;i<2;i ) for (j=0;p[i][j]>='0'
(18)有以下程序int fun1(double a){return a*=a;}int fun2(double x,double y){ double a=0,b=0; a=fun1(x);b=fun1(y);return(int)(a b);}main(){ double w; w=fun2(1.1,2.0);……}程序执行后变量w中的值是
有以下程序#include <iostream>#include <cmath>using namespace std;int fa(int x){ return x*x;}int fb(int x){ return x*x*x;}int f(int (*f1)(int x),int (*f2)(int x),int x){ return f2(x)-f1(x);}int main(int argc, char* argv[]){ int i; i=f(fa,fb,2); cout<<i<<endl; return 0;}程序运行后的输出结果是______。
(20)有以下程序#include <iostream>using namespace std;void swap(char *x,char *y){ char t; t=*x; *x=*y; *y=t;}int main(int argc, char* argv[]){ char s1[]="abc",s2[]="123"; swap(s1,s2); cout<<s1<<","<<s2<<endl; return 0;}程序执行后的输出结果是