以下是一程式,輸入兩個整數a 及b,輸出a 除以b 的商及餘數。
請問程式中的空白處A要填入何程式碼?
int main(void)
{
int a=14, b=3;
printf("顯示兩數相除之商數:%d\n", a/b );
printf("顯示兩數相除之餘數:%d\n", A );
return 0;
}
C Programing --- chapter 4---1
Quiz
•
Computers
•
University
•
Hard
劉雲輝 劉雲輝
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
以下是一程式,輸入兩個整數a 及b,輸出a 除以b 的商及餘數。
請問程式中的空白處A要填入何程式碼?
int main(void)
{
int a=14, b=3;
printf("顯示兩數相除之商數:%d\n", a/b );
printf("顯示兩數相除之餘數:%d\n", A );
return 0;
}
a-b
a*b
a%b
b/a
2.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
1. 以下是輸入一整數,判斷是否為偶數的C程式碼片斷,
請問程式中的空白處A要填入何程式碼?
int main(void)
{
int a;
printf("整數:");
scanf("%d",&a);
if ( A )
printf("%d為偶數\n",a);
else
printf("%d為奇數\n",a);
return 0;
}
a/2=0
a%2=0
a/2==0
a%2==0
3.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
以下是C程式碼片斷,請問當輸入為32767時,螢幕顯示為何?
int num;
scanf("%d \n",&num);
num=(num/100)%10;
printf("%d\n", num);
3
2
7
6
4.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
以下是C程式碼片斷,請問螢幕顯示為何?
int main()
{
short int a = -5 ;
printf("%d\n",~a);
return 0;
}
5
-4
4
6
5.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
以下是C程式碼片斷,請問螢幕顯示為何?
short int a=3, b=2, c=5;
printf("%d\n",a<b||c!=a);
0
-1
1
10
6.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
x=7,則「x|10」的結果值為何?
(以十進位表示法表示)
7
10
14
15
7.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
y=7,則「y&14」的結果值為何?
(以十進位表示法表示)
6
7
14
15
10 questions
Basics of C
Quiz
•
University
10 questions
Computer-System Organization Quiz
Quiz
•
University
9 questions
c language quiz
Quiz
•
University
10 questions
Array in C
Quiz
•
University
10 questions
C - Pointers
Quiz
•
University
13 questions
C programming-1
Quiz
•
University
10 questions
控制工程實驗---1
Quiz
•
University
10 questions
Basics Of C Programming
Quiz
•
University
39 questions
Respect and How to Show It
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions
Interactive video
•
6th - 8th Grade
20 questions
Multiplication Facts
Quiz
•
3rd Grade
20 questions
Summer
Quiz
•
KG - University
19 questions
Minecraft
Quiz
•
6th Grade - Professio...
20 questions
3rd Grade Review
Quiz
•
KG - University
15 questions
Minecraft
Quiz
•
University
52 questions
Logos Trivia
Quiz
•
KG - University
7 questions
New national park celebrates Harriet Tubman's legacy
Interactive video
•
11th Grade - University
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Disney characters
Quiz
•
KG - Professional Dev...