training ep.2

training ep.2

University

11 Qs

quiz-placeholder

Similar activities

IT-7 : Remedial UH-3

IT-7 : Remedial UH-3

University

15 Qs

Family Quizz

Family Quizz

5th Grade - Professional Development

15 Qs

Telecomunicaciones 2021

Telecomunicaciones 2021

University

15 Qs

Graficas con matlab y pandas

Graficas con matlab y pandas

University

10 Qs

Hệ Điều Hành Của Máy Tính

Hệ Điều Hành Của Máy Tính

10th Grade - University

10 Qs

C++ Array Quiz

C++ Array Quiz

University

10 Qs

Programação - Loops e Arrays

Programação - Loops e Arrays

University - Professional Development

13 Qs

training ep.2

training ep.2

Assessment

Quiz

Computers

University

Easy

Created by

Samuel Onasis

Used 3+ times

FREE Resource

11 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 5 pts

Hal yang wajib dilakukan saat ingin memulai coding di C++

2.

MULTIPLE CHOICE QUESTION

1 min • 7 pts

Apa yang akan tercetak setelah menjalankan kode berikut di C++?

int x = 5;

int y = 10;

cout << x + y;

15

510

5 + 10

Error

3.

MULTIPLE CHOICE QUESTION

1 min • 7 pts

Apa yang akan tercetak setelah menjalankan kode berikut di C++?

int x = 8;

int y = 4;

cout << x / y;

2

2.5

3

4

4.

MULTIPLE CHOICE QUESTION

1 min • 9 pts

Apa hasil dari operasi berikut dalam C++?

int x = 7;

int y = 3;

cout << x % y;

1

2

3

4

5.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Bagaimana cara membuat percabangan di C++?

if(a > b) then {

cout << "hi";}

if else (a == b) then{

cout << "hai";}

if else then{

cout << "hey";}

if(a > b){

cout << "hi";}

elif(a == b){

cout << "hai";}

else{

cout << "hey";}

if(a > b) cout << "hi";

else if (a == b) cout << "hai";

else cout << "hey";

if(a > b){

cout << "hi"'}

else if (a == b){

cout << "hi"}

else{

cout << "hey"}

6.

MULTIPLE CHOICE QUESTION

1 min • 9 pts

Apa yang akan tercetak saat kode ini dicompile di C++?

int x = 10;

if(x < 5) cout << "Hello Saint";

else if(x < 10) cout << "Hello James";

else if(x < 15) cout << "Hello Mars";

else if(x == 10 and x < 15) cout << "Well hi";

else cout << "Ih lo siape";

Hello Saint

Hello James

Hello Mars

Well hi

Ih lo siape

Answer explanation

Kenapa "Hello Mars"? Karena didalam percabangan, saat ada kondisi yang terpenuhi, percabangan tersebut tidak akan terus melakuakn pengecekan pada percabangan dibawahnya (yang terhubung dengan percabangan tersebut [else if dan else]).

7.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Bagaimana cara membuat perulangan "for" dalam C++?

for(int i == 1; i < 10; i++){

cout << "mpc";

}

for i in range(10){

cout << "mpc";

}

for(i = 1; i < 10; i ++){

cout << "mpc";

}

for(int i = 1; i < 10; i += 1){

cout << "mpc";

}

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?