<pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

          <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

          <p id="bbfd9"></p>

          <p id="bbfd9"><cite id="bbfd9"></cite></p>

            <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

            <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
            <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>

            Practice筆試題

            時間:2020-07-21 15:00:53 筆試題目 我要投稿

            Practice筆試題

            Practice

            Practice筆試題

              Create a tree, which has h (h0) layers, and its each node has w (w0) sub-nodes.Please complete the following incomplete solution.

              #include stdlib.h

              #include string.h

              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; iwidth; i ) {

              denode ( );

              ;

              leaf = NULL;}

              return subtree;}

              else {

              for ( i=0; iwidth; i ) {

              }

              return subtree;

              }

              }

              main()

              {

              .........

              struct tree *root = NULL;

              root = dtree (root, h, w); // h and w are integers get from input

              .........

              }


             

            【Practice筆試題】相關文章:

            360筆試題目07-11

            華為2017筆試題08-16

            華為2017筆試試題08-10

            桂林銀行筆試題筆經07-20

            QMS2007筆試審核知識模擬試題11-02

            眼線筆類型-如何挑選眼線筆11-09

            馬克筆有哪些分類-馬克筆的分類11-03

            唇線筆怎么用10-11

            ps筆刷怎么安裝08-27

            美甲筆如何保養10-07

                    <pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

                    <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

                    <p id="bbfd9"></p>

                    <p id="bbfd9"><cite id="bbfd9"></cite></p>

                      <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

                      <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
                      <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
                      飘沙影院