首页 > 就业 > 笔试

笔试题sizeof

笔试题sizeof



笔试题(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分)

相关内容

热门阅读
随机推荐