Search Header Logo

Quiz ALPRO PASCA UTS 2

Authored by dike bayu

Other

University

Used 18+ times

Quiz ALPRO PASCA UTS 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

1.       Apa output dari program berikut?

for(int i = 0; i < 5; i++) {

    printf("%d ", i);

}

0 1 2 3 4

1 2 3 4 5

0 1 2 3 4 5

5 4 3 2 1

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Berapa kali perulangan di bawah ini akan dieksekusi?

int count = 0; while (count < 3) { count++; }

0

2

3

4

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Apa output dari program berikut?

for(int i = 1; i <= 3; i++) { for(int j = 1; j <= 2; j++) { printf("%d %d ", i, j); } }

1 1 2 2 3 3

1 2 3 1 2 3

1 1 1 2 2 2 3 3 3

1 2 1 2 1 2 3 3

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Apa hasil dari program berikut?

int x = 5; do { printf("%d ", x); x--; } while (x > 0);

5 4 3 2 1

1 2 3 4 5

5

1

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Berapa kali perulangan di bawah ini akan dieksekusi?

int y = 10; while (y < 5) { y += 2; }

0

1

5

Tidak ada eksekusi perulangan

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Berapakah jumlah elemen dalam array berikut?

int numbers[] = {4, 7, 2, 9, 5};

5

4

6

3

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Apa output dari program berikut?

int data[] = {3, 6, 2, 8, 1}; printf("%d", data[2] + data[4]);

3

9

7

10

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?