You are writing a method to compress an array of bytes.The array is passed to the method in a parameter named document.You need to compress the incoming array of bytes and return the result as an array of bytes.Which code segment should you use?()A.B.C.D.

题目

You are writing a method to compress an array of bytes.The array is passed to the method in a parameter named document.You need to compress the incoming array of bytes and return the result as an array of bytes.Which code segment should you use?()

A.

B.

C.

D.


相似考题
更多“You are writing a method to compress an array of bytes.The array is passed to the method i ”相关问题
  • 第1题:

    C. Dijkstra 算法:

    var

    a:array[1..maxn,1..maxn] of integer;

    b,pre:array[1..maxn] of integer; {pre[i]指最短路径上I的前驱结点}

    mark:array[1..maxn] of boolean;

    procedure dijkstra(v0:integer);


    正确答案:

     

    begin
    fillchar(mark,sizeof(mark),false);
    for i:=1 to n do begin
    d[i]:=a[v0,i];
    if d[i]<>0 then pre[i]:=v0 else pre[i]:=0;
    end;
    mark[v0]:=true;
    repeat {每循环一次加入一个离1集合最近的结点并调整其他结点的参数}
    min:=maxint; u:=0; {u记录离1集合最近的结点}
    for i:=1 to n do
    if (not mark[i]) and (d[i]<min) then begin
    u:=i; min:=d[i];
    end;
    if u<>0 then begin
    mark[u]:=true;
    for i:=1 to n do
    if (not mark[i]) and (a[u,i]+d[u]<d[i]) then begin
    d[i]:=a[u,i]+d[u];
    pre[i]:=u;
    end;
    end;
    until u=0;
    end;

  • 第2题:

    9、下面代码是实现数组array冒泡排序的片段,划线处应填入() int[] array = { 60, 56, 38, 45 }; int temp; for (int i = 0; i < 3; i++) { for (int j = 0; j < __________; j++) { if (array[j] < array[j + 1]) { temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; } } }

    A.i

    B.i+1

    C.4-i

    D.3-i


    3-i

  • 第3题:

    【单选题】设有数组int array[3][4],下列引用数组元素的方法中错误的是 。

    A.array[i][j]

    B.*(*(array+i)+j)

    C.*(array[i]+j)

    D.*(array+i*4+j)


    a++

  • 第4题:

    设有语句“int array[3][4];”,则在下面几种引用下标为i和j的数组元素的方法中,不正确的引用方式是________。

    A.*(array + i*4 + j)

    B.array[i][j]

    C.*(*(array + i) + j)

    D.*(array[i] + j)


    错误

  • 第5题:

    19、设有语句“int array[3][4];”,则在下面几种引用下标为i和j的数组元素的方法中,不正确的引用方式是________。

    A.*(array + i*4 + j)

    B.array[i][j]

    C.*(*(array + i) + j)

    D.*(array[i] + j)


    A

  • 第6题:

    下面代码是实现数组array冒泡排序的片段,划线处应填入() int[] array = { 60, 56, 38, 45 }; int temp; for (int i = 0; i < 3; i++) { for (int j = 0; j < __________; j++) { if (array[j] < array[j + 1]) { temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; } } }

    A.i

    B.i+1

    C.4-i

    D.3-i


    3-i