以下函數(shù)為鏈隊列的入隊操作,X為要人隊的結(jié)點(diǎn)的數(shù)據(jù)域的值,front,rear分別是鏈隊列的隊頭、隊尾指針。
(1)malloc(sizeof(structnode)) (2)rear->next=p (3)p