
C程式-5
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
劉雲輝 劉雲輝
Used 22+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
以下是C程式碼片斷,請問當輸入為75時,輸出為何? int score; printf("輸入成績(0~100):"); scanf("%d",&score); if (score>=90) printf("等級:A\n"); else if (score>=80) printf("等級:B\n"); else if (score>=70) printf("等級:C\n"); else if (score>=60) printf("等級:D\n"); else printf("等級:F\n"); system("pause"); return 0;
等級:A
等級:B
等級:C
等級:D
等級:F
2.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
以下是C程式碼片斷,請問輸出為何?
int score = 42;
if (score % 2 = =0)
printf("%d\n", score);
else
printf("%d\n", score/2);
2
4
21
42
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
以下是C程式碼片斷,請問螢幕輸出為何?
int main()
{
if(0)
printf(“0\n”);
if(1)
printf(“1\n”);
}
0
1
01
10
4.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int score;
printf("輸入成績(0~100):");
scanf("%d",&score);
switch(score){
case 90 … 100:
printf("等級:A\n");
break;
case 80 … 89:
printf("等級:B\n");
break;
case 70 … 79:
printf("等級:C\n");
break;
case 60 … 69:
printf("等級:D\n");
break;
default:
printf("等級:F\n ");
}
system("pause");
return 0;}
當輸入為89時,螢幕顯示為何?
等級:A
等級:B
等級:C
等級:D
等級:F
5.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
int x=5;
printf("x=%d",++x);
return 0;
請問螢幕顯示為何?
x=4
x=5
x=6
x=7
6.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
int x=10;
printf("x=%d",x--);
return 0;
請問螢幕顯示為何?
x=9
x=10
x=11
x=12
7.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
int sum=0;
int i;
for(i=1;i<=5;i=i+1)
{
sum=sum+i;
}
printf("sum=%d",sum);
請問螢幕顯示為何?
sum=10
sum=12
sum=15
sum=20
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
Already have an account?
Similar Resources on Wayground
13 questions
JavaScript Variables
Quiz
•
3rd Grade - University
12 questions
ASK Tingkatan 1: 2.2.2 Format Imej pada Fail yang Sama
Quiz
•
12th Grade - University
10 questions
Listen in Python
Quiz
•
University
13 questions
Chap 1: What is a program made of?
Quiz
•
University
14 questions
Power Point klasa V
Quiz
•
4th Grade - University
10 questions
cp06-01-1D-Array
Quiz
•
University
12 questions
TES AWAL MODUL 2
Quiz
•
University
10 questions
CHAPTER 1: COMPUTER SECURITY REVIEW
Quiz
•
University
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
34 questions
Unit 5 Review - The Middle Ages in Europe-B
Quiz
•
9th Grade - University
26 questions
Day2 classwork: Permutation and combination
Quiz
•
2nd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
