一道C语言的题目,解释下题目要求并且解答下,谢谢啦。
具体题目如下:/**getByte-Extractbytenfromwordx*Bytesnumberedfrom0(LSB)to3(MSB)*Examples:getB...
具体题目如下:
/*
* getByte - Extract byte n from word x
* Bytes numbered from 0 (LSB) to 3 (MSB)
* Examples: getByte(0x12345678,1) = 0x56
* Legal ops: ! ~ & ^ | + << >>
* Max ops: 6
*/
int getByte(int x, int n) {
return 2;
} 展开
/*
* getByte - Extract byte n from word x
* Bytes numbered from 0 (LSB) to 3 (MSB)
* Examples: getByte(0x12345678,1) = 0x56
* Legal ops: ! ~ & ^ | + << >>
* Max ops: 6
*/
int getByte(int x, int n) {
return 2;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询