函数del的功能是删除以head为首链表中学号为num的节点,请在______处填写适当内容,完成函数。 struct student{ int num; int score; struct student *next; }; struct student *del(struct student *head ,int num){ struct student *sp1,*sp2; if(head==NULL) return head; sp1=head; while(num!=_________){ sp2=sp1; sp1=sp1->next; } if(num==sp1->num){ if(sp1==head){ ___________=sp1->next; }else if(sp1->next==NULL){ sp2->next=________; }else{ sp2->next=sp1->next; } } return head; }
A: sp1->num head NULL
B: sp2->num sp1 NULL
C: sp2->num sp2 sp1
D: sp1->num head sp1
A: sp1->num head NULL
B: sp2->num sp1 NULL
C: sp2->num sp2 sp1
D: sp1->num head sp1
举一反三
- 函数del的功能是删除以head为首链表中学号为num的节点,请在______处填写适当内容,完成函数。struct student{ int num; int score; struct student *next; }; struct student *del(struct student *head ,int num){ struct student *sp1,*sp2; if(head==NULL) return head; sp1=head; while(num!=_________){ sp2=sp1; sp1=sp1->next; } if(num==sp1->num) { if(sp1==head){ ___________=sp1->next; }else if(sp1->next==NULL) { sp2->next=________; }else{ sp2->next=sp1->next; } n--; } return head; } A: sp1->num head NULL B: sp2->num sp1 NULL C: sp2->num sp2 sp1 D: sp1->num head sp1
- 执行PUSH ACC指令时,单片机完成的操作是() A: (SP) ←(SP) -1,((SP)) ← (ACC) B: (SP) ←(ACC),((SP)) ←(SP) -1 C: (SP) ←(SP) +1,((SP)) ← (ACC) D: (SP) ←(ACC),((SP)) ←(SP) + 1
- 生物碱分子中氮原子杂化方式与碱性大小的关系是() A: SP<sub>1</sub>>SP<sub>2</sub>>SP<sub>3</sub> B: SP<sub>1</sub>>SP<sub>3</sub>>SP<sub>2</sub> C: SP<sub>2</sub>>SP<sub>1</sub>>SP<sub>3</sub> D: SP<sub>3</sub>>SP<sub>2</sub>>SP<sub>1</sub> E: SP<sub>3</sub>>SP<sub>1</sub>>SP<sub>2</sub>
- 生物碱分子中氮原子杂化方式与碱性大小的关系是() A: sp<sup>1</sup>>sp<sup>2</sup>>sp<sup>3</sup> B: sp<sup>1</sup>>sp<sup>3</sup>>sp<sup>2</sup> C: sp<sup>2</sup>>sp<sup>1</sup>>sp<sup>3</sup> D: sp<sup>3</sup>>sp<sup>2</sup>>sp<sup>1</sup> E: sp<sup>3</sup>>sp<sup>1</sup>>sp<sup>2</sup>
- 堆栈寻址方式中,设A为通用寄存器,SP为堆栈指示器,MSP为SP指示器的栈顶单元,如果操作动作是:(A)→MSP,(SP)-1→SP,那么出栈操作的动作应为______。 A: (MSP)→A,(SP)-1→SP B: (SP)-1→SP,(MSP)→A C: (SP)+1→SP,(MSP)→A D: (MSP)→A,(SP)+1→SP