首页 > 题库 > 软考

阅读下列C程序,回答问题。【C程序】      PORT_LONG redisBitpos(void*s, PORT_ULONG count, int bit) {              PORT_ULONG *l              unsigned char *c;              PORT_ULONG skipval, word = 0, one;              PORT_LONG pos = 0;              PORT_ULONG j;              int found;              skipval = bit ? 0: UCHAR_MAX;                                           //1,2,3              c =(unsigned char*) s;              found = 0;              while((PORT_ULONG)c & (sizeof(*l)-1),&& count) {           //4,5                        if(*c != skipval){                                                         //6                              found= l;                              break;                        }                        c++;                        count--;                        pos += 8;              }              l =(PORT_ULONG*) c;              if(!found) {                                                                          //7                     while (count >= sizeof(*l)) {                                        //8                        if(*l != skipval)                                                         //9                           break;                        l ++;                        count -= sizeof(*l);                        pos += sizeof(*l)*8;                    }               }             c =(unsigned char*) l;             for (j=0; j< sizeof(*l); j++) {                                               //10                  word<<= 8;                  if(count) {                                                                    //11                     word |= *c;                                                               //12                     c++;                     count--;                   }              }            return 0;                                                                           //13         }

查看试题

暂未登录

成为学员

学员用户尊享特权

老师批改作业做题助教答疑 学员专用题库高频考点梳理

本模块为学员专用
学员专享优势
老师批改作业 做题助教答疑
学员专用题库 高频考点梳理
成为学员