4918
5880
3万
GROAD
曲径通幽,安觅芳踪。
#include <strings.h> int ffs(int i);
#include <stdio.h> #include <string.h> int main() { int i[] = {1, 2, 4, 8, 16, 32, 64, 0}; int j; for (j = 0; j < 8; j++) printf ("%d : %d \n", i[j], ffs(i[j])); return 0; }
./ffs 1 : 1 2 : 2 4 : 3 8 : 4 16 : 5 32 : 6 64 : 7 0 : 0
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )
GMT+8, 2025-5-4 01:04 , Processed in 0.098661 second(s), 23 queries .
Powered by Discuz! X3.2
© 2001-2013 Comsenz Inc.