数字笔试题
一、请填写bool , float, 指针变量 与“零值”比较的 if 语句,
数字笔试题
。(10分)请写出 bool flag 与“零值”比较的` if 语句。
if ( flag )
if ( !flag )
请写出 float x 与“零值”比较的 if 语句。
const float epsinon = 0.00001;
if ((x >= - epsinon) & (x <= epsinon)
不可将浮点变量用“==”或“!=”与数字比较,应该设法转化成“>=”或“<=”此类形式。
请写出 char *p 与“零值”比较的 if 语句,
资料共享平台
《数字笔试题》(http://meiwen.anslib.com)。if (p == null)
if (p != null)
二、以下为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分)
【数字笔试题】相关文章:
2.笔试题数字推理
3.数字推理笔试题
5.360笔试题目
6.360笔试题目
8.数字推理类笔试题