由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - another C interview question
相关主题
一道码公电面题(nvidia),怎么做一个CS题目,大家帮我看一下吧
问道面试题算法面试的疑惑
离奇的Amzaon第一轮电面bloomberg刚店面晚。 悔阿
砸了面试,发面题Post-order Tree Walk without marking node
Figure out size of int without using sizeof()电面,晕了
google电面第一轮面经 求blessWrite a funtion to find out longest palindrome in a given string
看到一个c的面试题,求教。有人面过NI么?
nvidia面试题C++ Q76: singly linked list -- 这个逆序打印有什么错?
相关话题的讨论汇总
话题: app话题: 0000话题: unsigned话题: 0x99999999话题: int
进入JobHunting版参与讨论
1 (共1页)
b****g
发帖数: 625
1
Suppose there is a platform where
sizeof(unsigned int) == 4
and the function app():
unsigned int app(unsigned int)
yields the following output:
app(0x80000000) == 1;
app(0x40000000) == 2;
app(3) == 0xc0000000;
app(0x70) == 0xe000000;
app(0x99999999) == 0x99999999
app(0xAAAAAAAA) == 0x55555555
app(app(x)) == x for all x.
Write a version of app()
m*****g
发帖数: 226
2
dont get it.
if(argv[1]==xxx) return xxxx?
n**x
发帖数: 30
3
把2进制各位倒过来。
拿计算器看看0x70和0xe000000的2进制表示。

【在 b****g 的大作中提到】
: Suppose there is a platform where
: sizeof(unsigned int) == 4
: and the function app():
: unsigned int app(unsigned int)
: yields the following output:
: app(0x80000000) == 1;
: app(0x40000000) == 2;
: app(3) == 0xc0000000;
: app(0x70) == 0xe000000;
: app(0x99999999) == 0x99999999

w***i
发帖数: 9
4
就是算出二进制的逆序。
1000 0000 0000 0000 => 0000 0000 0000 0001
1100 0000 0000 0000 => 0000 0000 0000 0011
and so on....

【在 b****g 的大作中提到】
: Suppose there is a platform where
: sizeof(unsigned int) == 4
: and the function app():
: unsigned int app(unsigned int)
: yields the following output:
: app(0x80000000) == 1;
: app(0x40000000) == 2;
: app(3) == 0xc0000000;
: app(0x70) == 0xe000000;
: app(0x99999999) == 0x99999999

1 (共1页)
进入JobHunting版参与讨论
相关主题
C++ Q76: singly linked list -- 这个逆序打印有什么错?Figure out size of int without using sizeof()
为什么考atoi比itoa要多的多?google电面第一轮面经 求bless
[合集] C++ Q76: singly linked list -- 这个逆序打印有什么错?看到一个c的面试题,求教。
实现next_permutationnvidia面试题
一道码公电面题(nvidia),怎么做一个CS题目,大家帮我看一下吧
问道面试题算法面试的疑惑
离奇的Amzaon第一轮电面bloomberg刚店面晚。 悔阿
砸了面试,发面题Post-order Tree Walk without marking node
相关话题的讨论汇总
话题: app话题: 0000话题: unsigned话题: 0x99999999话题: int