1、int intvert(unsigned int x,int p,int n)实现对x的进行转换,p为起始转化位, n为需要转换的长度,假设起始点在右边.

如x=0b0001 0001,p=4,n=3转换后x=0b0110 0001。

三道典型C语言题(5)



3、下面这段代码是把中英文混合字符串(汉字用两个字节表示,特点是第一个字节的最高位是1)中的大写字母转化为小写字母,找出其中的bug。


for (char *piterator=sz_word; *piterator!=0; piterator++)

{

if (*piterator & 0x80 != 0)

{

piterator++;

}

else if (*piterator>='A' && *piterator<='Z')

piterator += 32;

}
三道典型C语言题(5)

相关文章:

  • 2022-03-06
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2022-01-10
  • 2021-04-01
  • 2021-12-13
  • 2022-12-23
猜你喜欢
  • 2021-09-26
  • 2021-10-05
  • 2021-12-18
  • 2021-12-02
  • 2021-11-18
  • 2021-11-09
  • 2021-05-26
相关资源
相似解决方案