elm elm elm elm
tree elm elm elm
tree elm tree elm
编译失败
第1题:
阅读以下说明和C语言函数,将应填入(n)处的语句写在对应栏内。
【说明】
本程序利用非递归算法实现二叉树后序遍历。
【函数】
include<stdio.h>
include<stdlib.h>
typedef struct node{/*二叉树的结点数据结构类型*/
char data;
struct node *left;
struct node *right;
}BTREE;
void SortTreelnsert(BTREE **tree, BTREE *s)
{
if(*tree==NULL)*tree=s;
else
if(s->data<(*tree)->data)
SortTreelnsert((1),s);
else if(s->data>=(*tree)->data)
SortTreelnsert((2),s);
}
void TraversalTree(BTREE *tree)
{
BTREE *stack[1 000],*p;
int tag[1000],top=0;
p=tree;
do{
while(p !=NULL)
{
stack[++top]=p;
(3);
tag[top]=0; /*标记栈顶结点的左子树已进行过后序遍历*/
}
while(top>0&&(4))/*栈顶结点的右子树是否被后序遍历过*/
{
p=stack[top--];
putchar(p->data);
}
if(top>0)/*对栈顶结点的右子树进行后序遍历*/
{
(5);
tag[top]=1;
}
}while(top>0);
}
void PrintSortTree(BTREE *tree)
{
if(tree !=NULL)
{
printSortTree(tree->left);
putchar(tree->data);
pdntSortTree(tree->right);
}
}
main()
{
BTREE *root=NULL, *node;
char ch;
ch=getchar();
while(ch !='')
{
node=(BTREE*)malloc(sizeof(BTREE));
node->data=ch;
node->left=node->right=NULL;
SortTreelnsert(&root, node);
ch=getchar();
}
PrintSortTree(root);
putchar('\n');
TraversalTree(root);
}
第2题:
Traversing a binary tree in preorder is equivalent to(68).
A.Traversing the forest corresponding to the binary tree in root-first order
B.Traversing the forest corresponding to the binary tree in root-last order
C.Traversing the forest corresponding to the binary tree in breadth-first order
D.None of the above
第3题:
A. spanning-tree backbonefast
B. spanning-tree uplinkfast
C. spanning-tree portfast
D. spanning-tree cost512
第4题:
The cottonwood tree Mr. Flanagan found was an extremely tall tree with broad leaves.
第5题:
Which two of these statements correctly describe classic PIM-SM?()
第6题:
现有: class Tree { private static String tree = "tree "; String getTree () { return tree; } } class Elm extends Tree { private static String tree = "elm "; public static void main (String [] args) { new Elm() .go (new Tree()) ; } } void go (Tree t) { String s = t.getTree () +Elm.tree + tree + (new Elm() .getTree ()) ; System.out.println (s) ;} 结果为:()
第7题:
Which command enhances the 802.1D convergence time on ports that are connected to hosts?()
第8题:
public class Plant { private String name; public Plant(String name) { this.name = name; } public String getName() { return name; } } public class Tree extends Plant { public void growFruit() { } public void dropLeaves() { } } Which is true?()
第9题:
spanning-tree mode rapid-pvst
spanning-tree uplinkfast
spanning-tree backbonefast
spanning-tree mode mst
第10题:
elm elm elm elm
tree elm elm elm
tree elm elm tree
tree elm tree elm
第11题:
The code will compile without changes.
The code will compile if public Tree() { Plant(); } is added to the Tree class.
The code will compile if public Plant() { Tree(); } is added to the Plant class.
The code will compile if public Plant() { this(”fern”); } is added to the Plant class.
The code will compile if public Plant() { Plant(”fern”); } is added to the Plant class.
第12题:
elm elm elm elm
tree elm elm elm
tree elm tree elm
编译失败
第13题:
下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.println(”a=”+a+”b=+b) ; c=(b==false); System.out.printhln(”b=”+b+”c=”+c) ; } }
A.a=true b=false b=true c=false
B.a=true b=false b=true c=true
C.a=true b=true b=tree c=false
D.a=false b=false b=tree c=false
第14题:
考虑如下代码:
class Tree{}
class Pine extends Tree{}
class Oak extends Tree{}
public class Forest {
public static void main( String[] args ) {
Tree tree = new Pine();
if( tree instanceof Pine )
System.out.println( "Pine" );
if( tree instanceof Tree )
System.out.println( "Tree" );
if( tree instanceof Oak )
System.out.println( "Oak" );
else
System.out.println( "Oops" );
}
}
则输出结果中有哪些?
A.Pine B.Tree C.Forest D.Oops E.无输出
第15题:
A. spanning-tree mode rapid-pvst
B. spanning-tree uplinkfast
C. spanning-tree backbonefast
D. spanning-tree mode mst
第16题:
第17题:
What is the Cisco IOS default behavior for switching from the shared tree to the shortest path tree in PIM-SM operations?()
第18题:
Which command enables RSTP on a switch?()
第19题:
final class Tree { private static String tree = "tree "; String getTree() { return tree; } } class Elm extends Tree { private static String tree = "elm "; public static void main(String [] args) { new Elm().go(new Tree()); } void go(Tree t) { String s = t.getTree()+Elm.tree+tree+(new Elm().getTree()); System.out.println(s); } } 结果为:()
第20题:
import java.io.*; public class Forest implements Serializable { private Tree tree = new Tree(); public static void main(String [] args) { Forest f= new Forest(); try { FileOutputStream fs = new FileOutputStream(”Forest.ser”); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(f); os.close(); } catch (Exception ex) { ex.printStackTrace(); } } } class Tree { } What is the result?()
第21题:
spanning-tree guard root
spanning-tree portfast bpduguard default
spanning-tree bpduguard enable
spanning-tree bpdufilter enable
spanning-tree portfast bpdufilter default
第22题:
Compilation fails.
An exception is thrown at runtime.
An instance of Forest is serialized.
A instance of Forest and an instance of Tree are both serialized.
第23题:
spanning-tree mode rapid-pvst
spanning-tree uplinkfast
spanning-tree backbonefast
spanning-tree mode mst
第24题:
immediately after receiving the first packet on the shared tree for a given (S,G)
after receiving over 1 kb/s traffic onthe shared tree for a given (S,G)
10 seconds after receiving the first packet on the shared tree for a given (S,G)
30 seconds after receiving the first packet on the shared tree for a given (S,G)
after receiving over 10 kb/s traffic onthe shared tree for a given (S,G)