计算机程序设计第六章

计算机程序设计第六章

University

10 Qs

quiz-placeholder

Similar activities

2025 python class first quiz

2025 python class first quiz

9th Grade - University

10 Qs

basic computer design

basic computer design

University

10 Qs

Round 1

Round 1

University

15 Qs

Informática TO

Informática TO

University

15 Qs

[WPL][D3PJJFG] Evaluasi Pertemuan 1

[WPL][D3PJJFG] Evaluasi Pertemuan 1

University

10 Qs

Graphics Design Class test 5th Batch

Graphics Design Class test 5th Batch

University

15 Qs

LA5.C5: Branching and Subroutines

LA5.C5: Branching and Subroutines

9th Grade - University

14 Qs

T02: Python - The Basics

T02: Python - The Basics

University

10 Qs

计算机程序设计第六章

计算机程序设计第六章

Assessment

Quiz

Computers

University

Hard

Created by

zaky zhang

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

假定int类型变量占用两个字节,其有定义:int x[10]={0,2,4};,则数组x在内存中所占字节数是(     )。

3

6

10

20

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

以下程序运行后的输出结果是                    

main()

{ int i,n[]={0,0,0,0,0};

  for(i=1;i<=4;i++)

  { n[i]=n[i-1]*2+1;

    printf("%d ",n[i]);

   }

}

1

3

7

15

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

以下对一维整型数组a的正确定义(说明)的是___。

int a(10);

int n=10,a[n];

int n;          

scanf("%d",&n);  

int a[n];

#define SIZE 10

int a[SIZE];

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

执行下面程序段后,变量k 的值是___。

int k=3,s[2];

s[0]=k; k=s[1]*10;

不定值

33

 30

10

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

以下对一维整型数组a初始化的语句中正确的是___。

int a[10]=(0,0,0,0,0);

int a[10]=();

int x=2,a[10]={10*x};

 int a[10]={0};

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

下列程序运行后的输出结果是___。

#define MAX 10

void main()

{  int i,sum,a[]={1,2,3,4,5,6,7,8,9,10};

sum=1;

for(i=0;i<MAX;i++) sum-=a[i];

printf("sum=%d\n",sum);

}

sum=55

sum=-54

sum=-55

sum=54

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

以下不能对二维数组a进行正确初始化的语句是___。

int a[2][3]={0};

int a[][3]={{1,2},{0}};

int a[2][3]={{1,2},{3,4},{5,6}};

int a[][3]={1,2,3,4,5,6};

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?