Redian新闻
>
Serve的OFFER只能用手机上的APP加吗?
avatar
Serve的OFFER只能用手机上的APP加吗?# Money - 海外理财
kx
1
【 以下文字转载自 Dreamer 讨论区 】
发信人: Dreamer (不要问我从哪里来), 信区: Dreamer
标 题: (麻烦转到jobhunting版)Splunk面经
发信站: BBS 未名空间站 (Fri Nov 1 12:33:13 2013, 美东)
--------------------------------------------
对方发来email,要求找以下三段code有什么问题:
1.
bool f(int x)
{
return !(x & 7);
}
2.
uint v[10];
uint i = 0;
while (i < 10)
v[i] = i++;
3.
bool f( uint n )
{
return (n & (n-1)) == 0;
}
这道题我只找到一个问题,就是调用f(n)时如果n是INT_MIN,那么返回true。
--------------------------------------------
avatar
m*o
2
蓝鸟APP正常,但是今天关了蓝鸟,REGISTER了SERVE。
CVS买的SERVE暂时卡,免费的。正式卡两周内收到。
正式卡可以在CVS 711 WALGREENS等RELOAD
手机上的APP登录不了,自动关闭。
OFFER能否在SERVE的网站上登录后加入?
谢谢
avatar
s*e
3
这些函数的目的是什么?不给目的的话,只要不潜在crash就是正确的。
avatar
g*n
4
可以登录后加。
不过还是twitter加方便。
avatar
l*i
5
problem 2, undefined behavior, because i is used in lhs and rhs and it is
not defined which side gets evaluated first
avatar
h*l
6
可以在CVS 711 WALGREENS reload VGC吗?
还是只能用cash?

【在 m****o 的大作中提到】
: 蓝鸟APP正常,但是今天关了蓝鸟,REGISTER了SERVE。
: CVS买的SERVE暂时卡,免费的。正式卡两周内收到。
: 正式卡可以在CVS 711 WALGREENS等RELOAD
: 手机上的APP登录不了,自动关闭。
: OFFER能否在SERVE的网站上登录后加入?
: 谢谢

avatar
l*i
7
problem 1 seems to check whether input is a multiple of 8, since it masks
all high order bits, but then there is a problem if input is negative.
avatar
w*g
8
which negative input causes problem? I checked 0, -8, -16, and -2147483648
(-2^31), all return true.

【在 l***i 的大作中提到】
: problem 1 seems to check whether input is a multiple of 8, since it masks
: all high order bits, but then there is a problem if input is negative.

avatar
a*m
9
C99 specification: "Between the previous and next sequence point an object
shall have its stored value modified at most once by the evaluation of an
expression. Furthermore, the prior value shall be accessed only to determine
the value to be stored."
google : sequence point
   
avatar
kx
10
【 以下文字转载自 Dreamer 讨论区 】
发信人: Dreamer (不要问我从哪里来), 信区: Dreamer
标 题: (麻烦转到jobhunting版)Splunk面经
发信站: BBS 未名空间站 (Fri Nov 1 12:33:13 2013, 美东)
--------------------------------------------
对方发来email,要求找以下三段code有什么问题:
1.
bool f(int x)
{
return !(x & 7);
}
2.
uint v[10];
uint i = 0;
while (i < 10)
v[i] = i++;
3.
bool f( uint n )
{
return (n & (n-1)) == 0;
}
这道题我只找到一个问题,就是调用f(n)时如果n是INT_MIN,那么返回true。
--------------------------------------------
avatar
s*e
11
这些函数的目的是什么?不给目的的话,只要不潜在crash就是正确的。
avatar
l*i
12
problem 2, undefined behavior, because i is used in lhs and rhs and it is
not defined which side gets evaluated first
avatar
l*i
13
problem 1 seems to check whether input is a multiple of 8, since it masks
all high order bits, but then there is a problem if input is negative.
avatar
w*g
14
which negative input causes problem? I checked 0, -8, -16, and -2147483648
(-2^31), all return true.

【在 l***i 的大作中提到】
: problem 1 seems to check whether input is a multiple of 8, since it masks
: all high order bits, but then there is a problem if input is negative.

avatar
a*m
15
C99 specification: "Between the previous and next sequence point an object
shall have its stored value modified at most once by the evaluation of an
expression. Furthermore, the prior value shall be accessed only to determine
the value to be stored."
google : sequence point
   
avatar
f*n
16
看不出来1有什么毛病,8 变成-8 是反转然后+1,
00001000 -> 11111000
mask 是00000111,没有错啊
avatar
c*p
17
mark
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。