1 / 1

homework #2

homework #2. (1). 執行講義 chap1-2, p.35-p.37 的程式 , 輸入至少 10 隻象的名字。 (2). 加入一新的 function 名為 reverse_elephant 至 (1) 程式中 , 其 function prototype 如下 : Elephant* reverse_elephant(Elephant* start);

oki
Download Presentation

homework #2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. homework #2 (1). 執行講義chap1-2, p.35-p.37的程式,輸入至少10隻象的名字。 (2). 加入一新的function名為reverse_elephant至(1)程式中,其function prototype如下: Elephant* reverse_elephant(Elephant* start); 此function的功能在於建立一新linked list,將原以start為起點的linked list中的資料做反向連結,然後傳回此新的linked list的起始位置的pointer值 ;並在main function中至少重複呼叫reverse_function兩次,用以驗證你的程式的正確性。例如: 原: start … 經reverse_elephant後: rstart … elp1 elp2 elpn 0 elpn elp2 elp1 0

More Related