Search Header Logo

Pre-test Perulangan dalam Pemrograman

Authored by Peserta 07605

Computers

University

Used 2+ times

Pre-test Perulangan dalam Pemrograman
AI

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 akan terjadi jika kondisi dalam perulangan while selalu bernilai True?

Program akan berjalan normal

Program akan berhenti otomatis

Program akan mengalami infinite loop

Program akan menghasilkan error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Sintaks yang benar untuk perulangan for dalam C++ adalah …

for (inisialisasi; kondisi; increment) { perintah }

for (kondisi; increment; inisialisasi) { perintah }

for { inisialisasi; kondisi; increment }

for (inisialisasi; kondisi) { perintah }

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Perbedaan utama antara while dan do-while adalah …

while mengevaluasi kondisi di awal, sedangkan do-while di akhir

while selalu berjalan minimal satu kali

do-while hanya bisa digunakan untuk perulangan bersarang

while tidak membutuhkan kondisi

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Perintah yang digunakan untuk keluar dari perulangan sebelum waktunya adalah …

Continue

break

goto

return

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Apa hasil dari program tersebut ?

1 2

1 2 3

1 2 3 4

Infinite loop

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?