首頁(yè)
題庫(kù)
網(wǎng)課
在線模考
桌面端
登錄
搜標(biāo)題
搜題干
搜選項(xiàng)
0
/ 200字
搜索
問(wèn)答題
【計(jì)算題】編寫程序,輸入某一時(shí)刻的時(shí)間,加一秒后輸出新時(shí)間。時(shí)間以時(shí)、分、秒表示(利用結(jié)構(gòu)類型)。
答案:
點(diǎn)擊查看答案
在線練習(xí)
手機(jī)看題
你可能感興趣的試題
填空題
下列函數(shù)用于向一非空鏈表插入節(jié)點(diǎn)(由stud指向),鏈表按照節(jié)點(diǎn)no域的升序排列。structtabinsert(structtab*head,structtab*stud){structtab*p0,*p1,*p2;p1=head;p0=stud;while((p0->no>p1->no)&&()){p2=p1;p1=p1->next;}if(p0->no<=p1->no)if(head==p1){p0->next=head;head=p0;}else{p2->next=p0;}else{p1->next=p0;}return(head);}
答案:
①p1->next!=NULL;②p0->next=p1;③p0->next=NULL
點(diǎn)擊查看答案
手機(jī)看題
填空題
已知head指向一個(gè)單向鏈表,鏈表中每個(gè)節(jié)點(diǎn)包含整型數(shù)據(jù)域(data)和指針域(next)。以下函數(shù)sum求出鏈表中所有節(jié)點(diǎn)的數(shù)據(jù)域的和值,并作為函數(shù)值返回。#include
structlink{intdata;structlink*next;};voidmain(){structlink*head;ints,sum(structlink*);//省略建立鏈表程序s=sum(head);printf("sum=%d\n",s);}intsum(structlink*head){structlink*p;ints=0;p=head;while(){s+=;p=;}return();}
答案:
①p!=NULL;②p->data;③p->next;④s
點(diǎn)擊查看答案
手機(jī)看題
微信掃碼免費(fèi)搜題