就业数据资源平台
当前位置:首页 > 笔试题目
笔试题(sizeof)


以下为Windows NT下的32位C++程序,请计算sizeof的值(10分)




char str[] = “Hello” ;


       char    *p = str ;

int n = 10;


请计算


sizeof (str ) = 6 (2分)


sizeof ( p ) = 4 (2分)


sizeof ( n ) = 4




void Func ( char str[100])


{


请计算


sizeof( str ) = 4 (2分)


}




void *p = malloc( 100 );


请计算


sizeof ( p ) = 4 (2分)


就业数据资源平台