
for dan if bahasa C
Authored by Yarlis Andrianis
Computers
11th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 10 pts
Apa output dari kode berikut?
#include <stdio.h>
int main() {
int x = 5;
if (x > 3) {
printf("A");
} else {
printf("B");
}
return 0;
}
A
B
tidak ada output
errot
2.
MULTIPLE CHOICE QUESTION
3 mins • 10 pts
Apa output dari kode berikut?
#include <stdio.h>
int main() {
int i;
for (i = 0; i < 5; i++) {
printf("%d ", i);
}
return 0;
}
error
0 2 4
0 1 2 3 4
1 2 3 4 5
3.
MULTIPLE CHOICE QUESTION
3 mins • 10 pts
hasil output dari kode berikut adalah :
#include <stdio.h>
int main() {
int x = 10;
if (x % 2 == 0) {
printf("Genap");
} else
{ printf("Ganjil");
}
return 0; }
ganjil
genap
tidak ada output
error
4.
MULTIPLE CHOICE QUESTION
3 mins • 10 pts
Apa fungsi dari pernyataan if (kondisi)?
Melakukan perulangan
Menentukan kondisi percabangan
Mencetak output
Mendeklarasikan variabel
5.
MULTIPLE CHOICE QUESTION
3 mins • 10 pts
Apa fungsi dari pernyataan for (inisialisasi; kondisi; iterasi)?
Menentukan kondisi percabangan
Melakukan perulangan
Mencetak output
Mendeklarasikan variabel
6.
MULTIPLE CHOICE QUESTION
3 mins • 10 pts
Output dari kode ini adalah :
#include <stdio.h>
int main() {
int i;
for (i = 1; i <= 3; i++) {
if (i % 2 != 0) {
printf("%d ", i);
}
}
return 0; }
1 2 3
1 3
2
error
7.
MULTIPLE CHOICE QUESTION
3 mins • 10 pts
Apa yang terjadi jika kondisi dalam pernyataan if bernilai salah (false)?
Blok kode di dalam if dieksekusi
Blok kode di dalam else dieksekusi (jika ada)
Perulangan dimulai
Program berhenti
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?
Similar Resources on Wayground
8 questions
Overview of IT
Quiz
•
6th Grade - University
10 questions
Avaliação 1T - JavaScript
Quiz
•
9th - 12th Grade
15 questions
Polecenia sieciowe
Quiz
•
1st - 12th Grade
15 questions
THỬ THÁCH VỚI CHƯƠNG TRÌNH CON
Quiz
•
11th Grade
14 questions
K10 - WHILE
Quiz
•
11th Grade
10 questions
Sistem Komputer
Quiz
•
10th - 11th Grade
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
14 questions
Bài 29. Nhận biết lỗi chương trình
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
8 questions
Spartan Way - Classroom Responsible
Quiz
•
9th - 12th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
14 questions
Boundaries & Healthy Relationships
Lesson
•
6th - 8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
3 questions
Integrity and Your Health
Lesson
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
9 questions
FOREST Perception
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade