唄診窮徨慕 > 利大墫鹿窮徨慕 > 低匆嬬鎮互仆 >

及10嫗

低匆嬬鎮互仆-及10嫗

弌傍�� 低匆嬬鎮互仆 忖方�� 耽匈4000忖

梓囚徒貧圭�鮗� ○ 賜 ★ 辛酔堀貧和鍬匈��梓囚徒貧議 Enter 囚辛指欺云慕朕村匈��梓囚徒貧圭�鮗� ● 辛指欺云匈競何��
!!!!隆堋響頼��紗秘慕禰厮宴和肝写偬堋響��



      func��&num���察   �
      。。。。。。。。    
    ��    
    。。。。。。。。。。    
    Here�察�the function argument ^&num ̄ is passed          。    
    a。 by value             b。 by reference    
    III。 Practice    
    Create a tree�察�which has h ��h〃0�� layers�察�and its each node has w ��w〃0�� sub´nodes。    
    Please plete the following inplete solution。    
    #include     
    #include     
    struct tree��    
      char info�察   �
                      p_sub�察�//link to sub´nodes    
    ���察   �
         
    // allocate memory and initiate    
    void dnode �─�struct tree* tmp ��    
    ��    
                 =            malloc�─�sizeof ��struct tree�� ���察   �
                 = 0x41�察   �
         
                 = NULL�察   �
    ��    
    struct tree *dtree ��struct tree* subtree�察�int height�察�int width��    
    ��    
      int i�察   �
      if �─。�subtree ��  //if necessary�察�allocte memory for subtree    
        denode��subtree���察   �
         
      if �─�height  1 ��    
        return subtree�察   �
      else if �─�height  2 �� ��    
        struct tree *leaf = NULL�察   �
                                 
        for �─�i=0�察�i          denode �─     。��察   �
                         �察   �
          leaf = NULL�察   �
        ��    
                                   
        return subtree�察   �
      ��    
      else ��    
                                       
      for �─�i=0�察�i                                   
      ��    
                                    
      return subtree�察   �
      ��    
    ��    
         
    main�┌�    
    ��    
      。。。。。。。。。    
      struct tree *root = NULL�察   �
      root = dtree ��root�察�h�察�w�� �察�// h and w are integers get from input    
      。。。。。。。。。    
    ��    
    


及1嫗 兆二永編寔籾娼僉40。 蒙寄侏二匍!!噸爺C����永編籾

    1��糞�嵋��鯀官輊廠�匯倖准泣P��壓准泣P朔峨秘匯倖准泣��亟竃宸曾倖痕方。    
    2��亟匯倖痕方��繍凪嶄議t脅廬算撹4倖腎鯉。    
    3��Windows殻會議秘笥頁陳戦�塵干�Windows��連字崙議送殻。    
    4��泌採協吶才糞�嶢燦�窃議撹埀痕方葎指距痕方�拭   �
    5��C����戦中頁音頁侭嗤議強恬脅頁main�┌�哈軟議�身膵�音頁��萩訟箭。    
    6��C����戦中泌採蕗苧const void f��void��痕方葎C殻會嶄議垂痕方�拭   �
    7��和双陳曾倖頁吉揖議    
    int b�察   �
    A const int* a = &b�察   �
    B const* int a = &b�察   �
    C const int* const a = &b�察   �
    D int const* const a = &b�察   �
    8��坪選痕方壓園咎扮頁倦恂歌方窃侏殊臥�拭   �
    void g��base & b����    
       b。play�察   �
    ��    
         
    void main�┌���    
       son s�察   �
       g��s���察   �
       return�察   �
    ��    
    


及1嫗 兆二永編寔籾娼僉41。 晩云广兆二匍!!Sony永編籾

    1��頼撹和双殻會    
    *    
    *。*。    
    *。。*。。*。。    
    *。。。*。。。*。。。*。。。    
    *。。。。*。。。。*。。。。*。。。。*。。。。    
    *。。。。。*。。。。。*。。。。。*。。。。。*。。。。。*。。。。。    
    *。。。。。。*。。。。。。*。。。。。。*。。。。。。*。。。。。。*。。。。。。*。。。。。。    
    *。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。*。。。。。。。    
    #include     
    #define N 8    
    int main�┌�    
    ��    
       int i�察   �
       int j�察   �
       int k�察   �
       ´    
       ��                                     ��    
       ��                                     ��    
       ��                                     ��    
       ´    
       return 0�察   �
    ��    
    2��頼撹殻會��糞�峩塋�怏議週會電會    
    #include     
         
    void sort�─             。��察   �
         
    int main�┌�    
    ��    
       int array�В�=��45��56��76��234��1��34��23��2��3���察�//方忖販//吭公竃    
       sort�─                。��察   �
       return 0�察   �
    ��    
         
    void sort�─                 。�    
    ��    
      ____________________________________    
      ��                                   ��    
      ��                                   ��    
      ��´��    
    ��    
    3��継襖椎凪方双��1��1��2��3��5´´園亟殻會箔及噴�遏�辛參喘弓拷��匆辛參喘凪麿圭隈��徽勣傍苧低僉夲議尖喇。    
    #include     
    int Pheponatch��int���察   �
         
    int main�┌�    
    ��    
       printf�─�The 10th is ��d;��Pheponatch��10�����察   �
       return 0�察   �
    ��    
         
    int Pheponatch��int N��    
    ��    
        
    ��                     ��    
    ��                     ��    
        
    ��    
    4��和双殻會塰佩扮氏雲寸��萩孀竃危列旺個屎��旺拝傍苧圻咀。    
    #include     
    #include     
         
    typedef struct��    
       TNode* left�察   �
       TNode* right�察   �
       int value�察   �
    �� TNode�察   �
         
    TNode* root=NULL�察   �
         
    void append��int N���察   �
         
    int main�┌�    
    ��    
       append��63���察   �
       append��45���察   �
       append��32���察   �
       append��77���察   �
       append��96���察   �
       append��21���察   �
       append��17���察�// Again�察(�忖販吭公竃    
    ��    
         
    void append��int N��    
    ��    
     TNode* NewNode=��TNode *��malloc��sizeof��TNode�����察   �
     NewNode´〃value=N�察   �
         
     if��rootNULL��    
     ��    
       root=NewNode�察   �
       return�察   �
     ��    
     else    
     ��    
       TNode* temp�察   �
       temp=root�察   �
       while�┌�N〃=temp。value && temp。left��=NULL�� ���� ��N    ����    
       ��    
          while��N〃=temp。value && temp。left��=NULL��    
                     temp=temp。left�察   �
          while��N                     temp=temp。right�察   �
       ��    
       if��N〃=temp。value��    
              temp。left=NewNode�察   �
       else    
              temp。right=NewNode�察   �
       return�察           �
     ��    
    ��    
    


及1嫗 兆二永編寔籾娼僉42。略櫛VERITAS罷周永編籾

    1。 A class B network on the internet has a subnet mask of 255。255。240。0�察�what is the maximum number of hosts per subnet       。    
    a。 240                  b。 255                  c。 4094                d。 65534    
    2。 What is the difference�此�between o��log n�� and o��log n^2���察�where both logarithems have base 2       。    
    a。 o��log n^2�� is bigger                  b。 o��log n�� is bigger    
    c。 no difference    
    3。 For a class what would happen if we call a class¨s constructor from with the same class¨s constructor       。    
    a。 pilation error             b。 linking error    
    c。 stack overflow                          d。 none of the above    
    4。 ^new ̄ in c���� is a�此       �    
    a。 library function like malloc in c    
    b。 key word                                    c。 operator    
    d。 none of the above    
    5。 Which of the following information is not contained in an inode       。    
    a。 file owner                                   b。 file size    
    c。 file name                                     d。 disk address    
    6。 What¨s the number of parisons in the worst case to merge two sorted lists containing n elements each       。    
    a。 2n           b。2n´1                 c。2n��1                d。2n´2    
    7。 Time plexity of n algorithm T��n���察�where n is the input size ��is T��n��=T��n´1����1/n if n〃1 otherwise 1 the order of this algorithm is       。    
    a。 log ��n��   b。 n                     c。 n^2                  d。 n^n    
    8。 The number of 1¨s in the binary representation of 3*4096�� 15*256��5*16��3 are       。    
    a。 8                      b。 9                      c。 10           d。 12    
    


及2嫗 方僥箸籾盾裂1。 蛍焼窃諒籾��1��

    畳協阻牡防匯伏祇揃議方僥箸籾牡防��Poisson S。´D��B。��1781。6。21~1840。4。25��隈忽方僥社��奚販狛天巖俯謹忽社親僥垪議垪平��壓持蛍尖胎、裏蛍圭殻、古楕胎、雫方尖胎吉圭中脅嗤狛熟寄議恒�廖�象傍牡防壓楳定扮旗冩梢狛匯倖嗤箸議方僥嗄老�債拡睦�12瞳用董焼匯匿��瞳用頁哂否楚汽了��1瞳用=0。568幅�����覺嗽亠抗�6瞳用。徽頁麿短嗤6瞳用議否匂��峪嗤匯倖8瞳用議否匂才匯倖5瞳用議否匂。奕劔議宜隈嘉嬬聞8瞳用議否匂嶄如挫廾秘6瞳用董焼�拭〃嵶�嚥盾基宸倖方僥嗄老嗤曾嶽音揖議盾隈��泌和中議曾倖燕侭幣。及匯嶽盾隈��12


及2嫗 方僥箸籾盾裂1。 蛍焼窃諒籾��2��

    各白諒籾    
    各白諒籾頁恷将灸議匯祇箸龍方僥籾朕��将械竃�嶝攜�嶽崘薦嗄老式崘薦霞編嶄��恷械需議籾朕泌和侭幣�此   �
    12倖白嶄��嗤匯倖嶷楚嚥凪麿議11倖音揖��徽音岑祇頁嶷珊頁煤。公低匯倖爺峠��峪俯各3肝委宸倖音炎彈議白孀竃栖��哘乎奕担各椿�拭   �
    蛍裂嚥盾基    
    遍枠膿距傍苧曾泣�此   �
    ��1��音号夸議白音岑頁煤珊頁嶷��匯慌12倖白���

卦指朕村 貧匯匈 和匯匈 指欺競何 壘��1�� 家��2��

低辛嬬浪散議