
计算机程序设计第六章

Quiz
•
Computers
•
University
•
Hard

zaky zhang
Used 1+ times
FREE Resource
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
Similar Resources on Wayground
12 questions
javaquizvivek

Quiz
•
University
10 questions
Java Control Flow statements

Quiz
•
University
12 questions
Array

Quiz
•
University
11 questions
Java Quiz 3 - Array

Quiz
•
University
12 questions
Divide et Impera

Quiz
•
11th Grade - University
10 questions
Java Basics

Quiz
•
University
9 questions
Passaggio parametri

Quiz
•
University
15 questions
Array Java

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University