• 2022-07-27
    以下程序段的输出结果是( )。[img=294x478]17e43bcb95a3936.png[/img]
    A: count= 1
    B: count=2
    C: count=3
    D: count=4
  • B

    内容

    • 0

      (Short-answer Question)What transitional states are possible when a 4-bit asynchronous binary counter changes from (a) count 2 to count 3 (b) count 3 to count 4 (c) count 1010 to count 1110 (d) count 15 to count 0

    • 1

      执行下述代码: count = 5 def print_num(): count = 2 count += 1 print(count) 当调用print_num()函数时,输出结果为( )

    • 2

      给定一个Java程序的代码如下所示,则编译运行后,输出结果是 ( )。 public class Test { int count = 9; public void count() { System.out.println("count=" + count++); } A: blic static void main(String args[]) new Test().count(); new Test().count();}} B: count=9 count=9 C: count=10 count=9 D: count=10 count=10 E: count=9 count=10

    • 3

      运行以下脚本,并依次输入1234,结果是#!/bin/bashmax=0for((count=1;count<=5;count=count+1))doecho"Enternumber$count:"readnumif&#91;$num-gt$max&#93;thenmax=$numfidoneecho"Max=$max" A: Max=1 B: Max=2 C: Max=3 D: Max=4

    • 4

      下面程序的运行结果是()。#includeintmain(){inta,s,n,count;a=2;s=0;n=1;count=1;while(count<=7){n=n*a;s=s+n;++count;}printf(“%d”,s);return0;}