【正文】
eak。 case 2: printf(you will delete a node from the link\n)。 printf(please input the location of the node:\n)。 scanf(%d, amp。location)。 node = ptr。 if(location ==1) trail = NULL。 trail = ptr。 i = 1。 while(ilocation){ trail = traillink。 i++。 } node = traillink。 delete_node(p, trail, node)。 print(ptr)。 break。 case 3: printf(you will invert the link\n)。 ptr = invert(ptr)。 print(ptr)。 break。 default: break。 return 1。 } printf(please input your choice\n)。 scanf(%d, amp。choose)。 } return 0。}//根據(jù)用戶的輸入數(shù)值建立一個(gè)新的單向鏈表:list_pointer create(){ int i, current, length。 list_pointer p1, p2, head。 printf(please input the node number of the link:\n)。 scanf(%d, amp。length)。 printf(the number of the link is : %d\n, length)。 printf(please input the data for the link node:\n)。 i =0。 p1= p2= (list_pointer) malloc(sizeof(list_node))。 head = p1。 for(i = 0。 i scanf(%d, 164。t)。 p1data = current。 p2link = p1。 p2 = p1。 p1 = (list_pointer) malloc(sizeof(list_node))。 } p2link = NULL。 return head。}……(1)畫出主函數(shù)main的控制流程圖。(10分)(2)設(shè)計(jì)一組測試用例,盡量使main 函數(shù)的語句覆蓋率能達(dá)到100% 。如果認(rèn)為該函數(shù)的語句覆蓋率無法達(dá)到100% ,需說明原因。(8分)/location){/location