C++-面试题.docxVIP

  • 6
  • 0
  • 约6.88千字
  • 约 9页
  • 2017-01-03 发布于重庆
  • 举报
C++面试题(注:由于技术题库部分内容来源于网络,内容仅供参考,请面试官根据实际情况甄选使用)填空题1、class A{ long num; long* lnum; char cha[8];};A *p = 0;p + 0x1 = __0 x 18__(unsigned long)p + 0x1 = 1 (unsigned long*)p + 0x1 = __0X8__(char*)p + 0x1 = ____(这个不知道答案)2、void GetMemory( char **p, intnum ){ *p = (char *) malloc( num );}int main( void ){ char *str = NULL;GetMemory( str, 100);strcpy( str, grand );free( str ); if (str != NULL)strcpy(str, soft);printf (\n str is %s, str);getchar ();}写出结果; stris softd(1个C++工程师提供的答案)3、#includestdio.h intinc(int a){ return(++a); } int multi(int*a,int*b,int*c) { return(*c=*a**b); }typed

文档评论(0)

1亿VIP精品文档

相关文档