棒子出的samsung galaxy note 10.1和牛排的对比图# PDA - 掌中宝
h*g
1 楼
Q1. Which of the following statements about the const qualifier is false?
a) A const variable much be initialized during declaration.
b) no explicit cast is required when converting from non-const to const
c) It is not legal to declare a variable both const and volatile
d) Const pointers are allowed in C
这个是不是选a啊?
Q2. Safe Programming Question
Which of the following will not have undefined behavior?
a) x+= ++i + ++i;
b) i+= ++i;
c) x += ++i;
d) x += ++i + --i;
貌似都能跑啊?到底啥叫underdefined behavior?
Q3)
what's wrong with the following piece of code?
float count=0.0;
while(count!=1000000.0){
...some code here...
count=count+1.0;
}
a) It is not legal to use a float variable as a loop variable.
b) This loop may not stop due to rounding error in the loop variable
c) 1000000.0 is too large to be represented as a floating point number.
d) count must be incremented by 1 not 1.0
a) A const variable much be initialized during declaration.
b) no explicit cast is required when converting from non-const to const
c) It is not legal to declare a variable both const and volatile
d) Const pointers are allowed in C
这个是不是选a啊?
Q2. Safe Programming Question
Which of the following will not have undefined behavior?
a) x+= ++i + ++i;
b) i+= ++i;
c) x += ++i;
d) x += ++i + --i;
貌似都能跑啊?到底啥叫underdefined behavior?
Q3)
what's wrong with the following piece of code?
float count=0.0;
while(count!=1000000.0){
...some code here...
count=count+1.0;
}
a) It is not legal to use a float variable as a loop variable.
b) This loop may not stop due to rounding error in the loop variable
c) 1000000.0 is too large to be represented as a floating point number.
d) count must be incremented by 1 not 1.0