中文国产日韩欧美视频,午夜精品999,色综合天天综合网国产成人网,色综合视频一区二区观看,国产高清在线精品,伊人色播,色综合久久天天综合观看

Practice筆試題

時(shí)間:2024-10-25 04:07:11 資料大全 我要投稿
  • 相關(guān)推薦

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筆試題】相關(guān)文章:

360筆試題目06-27

筆美國(guó)國(guó)家儀器試題目09-23

搜狐產(chǎn)品筆歸分享筆試題目07-05

新浪筆經(jīng)04-27

新聞總署筆經(jīng)10-13

IBM公司筆經(jīng)09-15

營(yíng)銷卷筆經(jīng)10-25

consulting firm筆經(jīng)05-06

科勒筆經(jīng)09-23

愛立信機(jī)考筆經(jīng)07-23