[填空题]

写出下面算法的功能。voidfunction(Bitree*t){if(p!=NULL){function(p->lchild);function(p->rchild);printf(“%d”,p->data);}}

参考答案与解析:

相关试题

写出下面算法的功能。Bitree*function(Bitree*bt){Bit

[填空题] 写出下面算法的功能。Bitree*function(Bitree*bt){Bitree*t,*t1,*t2;if(bt==NULL)t=NULL;else{t=(Bitree*)malloc(sizeof(Bitree));t->data=bt->data;t1=function(bt->left);t2=function(bt->right);t->left=t2;t->right=t1;}return(t);}

  • 查看答案
  • 写出下面算法的功能。intfunction(SqString*s1,SqStri

    [问答题] 写出下面算法的功能。intfunction(SqString*s1,SqString*s2){inti;for(i=0;ilength&&ilength;i++)if(s->data[i]!=s2->data[i])returns1->data[i]-s2->data[i];returns1->length-s2->length;}

  • 查看答案
  • 写出下面各数。

    [试题]写出下面各数。

  • 查看答案
  • 写出算法的功能。intfun(sqstring*s,sqstring*t,int

    [问答题] 写出算法的功能。intfun(sqstring*s,sqstring*t,intstart){inti=start-1,j=0;while(ilen&&jlen)if(s->data[i]==t->data[j]){i++;j++;}else{i=i-j+1;j=0;}if(j>=t->len)returni-t->len+1;elsereturn-1;}

  • 查看答案
  • 写出算法的功能。int L(head){node * head;int n=0;

    [填空题] 写出算法的功能。int L(head){node * head;int n=0;node *p;p=head;while(p!=NULL){ p=p->next; n++; }return(n);}

  • 查看答案
  • 写出下面各项DOS命令的功能。1).DELB:*.PRG2).FORMATA:/

    [问答题] 写出下面各项DOS命令的功能。1).DELB:*.PRG2).FORMATA:/S/V3).COPYC:DOSB*.*B:WT4).DIRA:>PRN

  • 查看答案
  • 写出下面各题最简单的整数比

    [主观题]写出下面各题最简单的整数比

  • 查看答案
  • 写出下面5行中所画构件的名称 :

    [问答题] 写出下面5行中所画构件的名称 :

  • 查看答案
  • 写出下面树中序遍历的结果(33)。

    [单选题]写出下面树中序遍历的结果(33)。A.HDIBEJAFCGB.ABDHIEJCFGC.ABCDEFGHIJD.HIDJEBFGCA

  • 查看答案
  • 写出下面程序的输出()。public class Test {public st

    [单选题]写出下面程序的输出( )。 public class Test { public static void main (String args[ ]) { iht x=1, y=2; System. out. println ("result="+x+y); System. out. println ("result="+(x+y));A.result=12 result=12B.result=3 result=3C.result=3 result=12D.result=12 result

  • 查看答案