
Kuis 2_Operator Increment & Decrement dalam c++
Authored by NUR AFNI
Computers
12th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa yang dilakukan operator increment dalam C++?
Operator increment dalam C++ tidak memiliki fungsi khusus.
Operator increment dalam C++ digunakan untuk menambahkan nilai variabel sebesar 1.
Operator increment dalam C++ digunakan untuk mengalikan nilai variabel sebesar 1.
Operator increment dalam C++ digunakan untuk mengurangi nilai variabel sebesar 1.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa nilai variabel y dalam ekspresi berikut?
Apa nilai variabel y dalam ekspresi berikut?
4
5
6
7
Answer explanation
Nilai y adalah 5 (nilai awal x) ditambah 2, karena postfix decrement digunakan, maka x akan dikurangi setelah digunakan dalam ekspresi.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa nilai variabel x setelah ekspresi berikut dijalankan?
Apa nilai variabel x setelah ekspresi berikut dijalankan?
2
3
4
5
Answer explanation
Awalnya, x adalah 3. Kemudian, x diincrement sehingga nilainya menjadi 4. Setelah itu, x didekrement sehingga nilainya menjadi 3 lagi. Oleh karena itu, nilai akhir dari x adalah 2.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Pilihlah contoh penggunaan operator increment dalam sebuah loop yang tepat.
for(int i = 5; i > 0; i--)
for(int i = 0; i < 5; i--)
for(int i = 0; i < 5; i++)
for(int i = 0; i <= 5; i++)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Berikan contoh penggunaan operator decrement dalam sebuah loop.
for(int i = 10; i > 0; i--) { // code here }
for(int i = 0; i > 10; i++) { // code here }
for(int i = 10; i < 0; i++) { // code here }
for(int i = 0; i < 10; i++) { // code here }
Access all questions and much more by creating a free account
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?
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade