
计算机程序设计第六章
Quiz
•
Computers
•
University
•
Hard
zaky zhang
Used 1+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Deep Learning Quiz
Quiz
•
University
10 questions
ICT 1202-B-2021-Q1
Quiz
•
University
10 questions
Quiz 3
Quiz
•
University
15 questions
PROGRAMMING IN PYTHON - UNIT II - TEST 1 MCQS
Quiz
•
University
10 questions
Quiz 1
Quiz
•
University
15 questions
Python Basics
Quiz
•
KG - University
10 questions
Python-Quiz-Basic-Datatypes
Quiz
•
12th Grade - Professi...
12 questions
Quiz 9: Pointer
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
Discover more resources for Computers
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
25 questions
Waves-8th Grade Physical Science
Quiz
•
KG - University
41 questions
Unit 8 Key Terms
Quiz
•
11th Grade - University
10 questions
Product & Quotient Derivative Rules
Quiz
•
University
5 questions
How to Calculate Force - Newton's 2nd Law of Motion
Interactive video
•
10th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
