效率匹配。 [英] efficiency match.
问题描述
游戏:
写一个C函数来交换一个字符的位,这样它的位将成为
char.MSBs成为其LSB等。例如11001100
二进制文件将成为00110011二进制文件。
----------------------- ----------------
THE GAME :
Write a C function to swap the bits of a char so
that its bits would become the mirror image of the
char.MSBs become its LSBs etc. E.g. 11001100
binary would become 00110011 binary.
---------------------------------------
推荐答案
" Aman JIANG" < Am ******* @ gmail.comwrote:
"Aman JIANG" <Am*******@gmail.comwrote:
游戏:
写一个C函数交换一个char的位,所以
它的位将成为
char.MSBs的镜像成为它的LSB等。例如11001100
二进制将成为00110011二进制。
THE GAME :
Write a C function to swap the bits of a char so
that its bits would become the mirror image of the
char.MSBs become its LSBs etc. E.g. 11001100
binary would become 00110011 binary.
好吗?来吧,展示你到目前为止的工作。这是你的功课,而不是我们的b $ b。
Richard
Well? Go ahead, demonstrate your work so far. It''s your homework, not
ours.
Richard
Aman JIANG说:
Aman JIANG said:
游戏:
编写一个C函数来交换char的位数,所以
它的位将成为
char的镜像.MSB成为其LSB等。例如11001100
二进制将成为00110011二进制。
THE GAME :
Write a C function to swap the bits of a char so
that its bits would become the mirror image of the
char.MSBs become its LSBs etc. E.g. 11001100
binary would become 00110011 binary.
规则:
首先尝试一下,如果你做不到,请发布你最好的 - 努力代码如此
我们可以帮你修复它。
-
Richard Heathfield
Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk
电子邮件:rjh在上面的域名(但显然放弃了www)
THE RULES:
Try it yourself first, and if you can''t do it, post your best-effort code so
that we can help you fix it.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
它只是补充操作,可以完成使用〜操作符。
it is just complement operation, can be done using ~ operator.
这篇关于效率匹配。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!