【正文】
s real name was Nasreddin. He was wise and witty and, more importantly, he had the courage to resist the exploitation of noblemen. He was also full of passion and tried his best to help poor people. Adventure of Shuke and Beita【舒克與貝塔】 Adventure of Shuke and Beita (Chinese: 舒克和貝塔 ) is a classic animation by Zheng Yuanjie, who is known as King of Fairy Tales in China. Shuke and Beita are two mice who don39。} int GetMonth(){return month。 修改程序,在日期類中定義日期的輸出函數(shù),這樣,主程序就可以簡化。//取月份 int getday ()。主程序中定義了并初始化了一個數(shù)組,然后計(jì)算該數(shù)組各元素的和,并輸出結(jié)果。 問題 2:程序第 4, 5 行有什么作用?如果沒有這兩行語句,程序還正確嗎? 答: 不正確。 42. delete ptop。 16. friend class Stack。 函數(shù)的原型: char MinCode(char charAry[])。 答: Node * insNode(Node * head, int newValue) { Node * newNode = new Node。Z39。 ( 40分) 1.寫一個函數(shù),找出給定字符串中大寫字母字符(即’ A’ ‘ Z’這 26個字母)的個數(shù)(如字符串” China Computer Wrold”中大寫字母字符的個數(shù)為 3 個)。 函數(shù)返回值:相應(yīng)于給定的 n,右邊表達(dá)式運(yùn)算結(jié)果。 Pre = head; if (head == NULL) head = newNode。 i++) { if (charAry [i] mixCode) mixCode = str[i]。)。 51. if (bottom == NULL) bottom = top = pNew。 問題 4:程序中模板類 Stack 的析構(gòu)函數(shù)主要做了什么事情?為什么要這么做? 答: 析構(gòu)函數(shù)中主要是釋放存放的各個節(jié)點(diǎn)所 占涌空間。 b 。//用已有日期 x構(gòu)造一個新對象 (1999,3,13)。 date d3(d1)。 month=mth。s feud with Nezha over his son39。s 10 mustsee animations】 The Chinese animation industry has seen considerable growth in the last several years. It went through a golden age in the late 1970s and 1980s when successively brilliant animation work was produced. Here are 10 mustsee classics from China39。 public:Data(int yr,int mth,int dy):year(yr),month(mth),day(dy){}。 cout () . () . () endl。 d ) e 。 // 2 Stack q3(10)。 63. } 64. } 問題 1: 程序中有幾處填空,將它們完成。 33. //從堆棧頂彈出一個節(jié)點(diǎn),并返回該節(jié)點(diǎn)的值 34. templateCLASS TYPE 35. Type Stack::pop() 36. { 37. StackItem *ptop。閱讀程序,根據(jù)程序后面的問題作出相應(yīng)解答。 else pre = cur。 //存放數(shù)值 Node * next。 i++) if (str[i] = 39。 str[i] != 0x0。 其中,鏈表節(jié)點(diǎn)的定義如下: struct Nodee{ int Value。 if(newValue = curValue) break。為方便起見,程序中加上了行號。 32. //模板類 Stack 的函數(shù)成員 pop()的實(shí)現(xiàn)。 62. p = q。 // 1 Stack q2。 c 。 cout date:。 } 答: class Date { private:int year,month,day。} 面向?qū)ο蟪绦蛟O(shè)計(jì) 大作業(yè) 班級 : 學(xué)號: 姓名: 請您刪除一下內(nèi)容, O(∩ _∩ )O 謝謝?。。 ?China39。s death. Through bravery and wit, Nezha finally broke into the underwater palace and successfully defeated him. The film shows various kinds of attractive sceneries and the traditional culture of China, such as spectacular mountains, elegant sea waves and exquisite ancient Chinese clothes. It has received a variety of awards. Havoc in