设有以下说明和定义:#include<iostream. h>Void main() {typedef union{long i; int k[5]; char c;}DATE;struct date{iNt cat; DATE cow; double. dog;}too;DATE max;则下列语句的执行结果是( )。cout<<(sizeof(struct date)+sizeof(max))<<end1;}
A.26
B.52
C.18
D.8
第1题:
设有以下函数:
void fun(int n,char*$s){……}
则下面对函数指针的定义和赋值均正确的是
A.void(*pf)( );pf=fun;
B.void*Pf( );pf=fun;
C.void*pf( ); *pf=fun;
D.void(*pf)(int,char);nf=&fun;
第2题:
设有以下函数:
voidfun(intn,char}s){……}
则下面对函数指针的定义和赋值均正确的是( )。
A.void(*pf)(int,char);pf=&fun;
B.void+pf( );pf=fun;
C.void*pf( );*pf=fun;
D.void(*pf)(int,char*);pf=fun;
第3题:
设有如下程序#include<atdio.h>main(){int**k, *j, i=100;j=&i, k=&j;printf("%d\n",**k);}上述程序的输出结果是______。
A.运行错误
B.100
C.i的地址
D.i的地址
第4题:
设有以下说明和定义: #include<iostream. h> Void main() { typedef union { long i; int k[5]; char c; } DATE; struct date {int cat; DATE cow; double dog; }too; DATE max; cout<<(sizeof(struct date)+sizeof(max))<<end1;}
A.26
B.52
C.18
D.8
第5题:
设有如下程序 #include<stdio.h> main() { int**k,*j,i=100 j=&i; k=&j; printf("%d\n",**k); } 上述程序的输出结果是______。
A.运行错误
B.100
C.i的地址
D.j的地址
第6题:
以下程序运行后的输出结果是() 。 #include <stdio.h> #include <stdlib.h> #include <string.h> main() { char *p; int i; p=(char *)malloc(sizeof(char)*20); strcpy(p,"welcome"); for(i=6;i>=0;i--) putchar(*(p+i)); printf("n"); free(p); }