
Pemrograman C: printf dan scanf
Quiz
•
Information Technology (IT)
•
12th Grade
•
Practice Problem
•
Medium
Zunny Hidayatulloh
Used 5+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa fungsi dari printf dalam pemrograman C?
Menyimpan data ke dalam file.
Menghitung nilai dari variabel.
Mengubah format data menjadi JSON.
Mencetak output ke layar.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sebutkan beberapa format spesifier yang umum digunakan dalam printf!
%b
%p
%x
%d, %f, %s, %c
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bagaimana cara mencetak string menggunakan printf?
echo 'Hello, %s!' % nama;
printf(nama, 'Hello!');
printf("Hello, %s!\n", nama);
print(nama);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa perbedaan antara %d dan %f dalam printf?
%d untuk floating-point, %f untuk hexadecimal.
%d untuk integer, %f untuk floating-point.
%d untuk string, %f untuk integer.
%d untuk karakter, %f untuk boolean.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Jelaskan cara menggunakan scanf untuk membaca input dari pengguna!
Gunakan scanf("%d", &variabel); untuk membaca input integer.
Gunakan scanf('%c', &variabel); untuk membaca input karakter.
Gunakan scanf('%f', &variabel); untuk membaca input float.
Gunakan scanf('%s', variabel); untuk membaca input string tanpa alamat.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa yang terjadi jika format spesifier dalam scanf tidak sesuai dengan tipe data variabel?
Data akan dibaca dengan benar tanpa masalah.
Variabel akan diisi dengan nilai default yang aman.
Kesalahan dalam pembacaan data dan perilaku tidak terduga.
Program akan berhenti dan menampilkan pesan kesalahan.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sebutkan cara untuk membaca input karakter tunggal menggunakan scanf!
scanf('%d', &variabel);
scanf('%s', variabel);
scanf('%c', &variabel);
scanf('%f', &variabel);
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
20 questions
KUIS BAB V PENGEMBANGAN APLIKASI MOBILE
Quiz
•
9th - 12th Grade
20 questions
Pemrograman Blokly
Quiz
•
9th Grade - University
10 questions
SOAL KODING-1
Quiz
•
12th Grade
15 questions
TSC Information Security Awareness Campaign 2024
Quiz
•
12th Grade
15 questions
INFORMATIKA KELAS 7A DAN TB
Quiz
•
7th Grade - University
15 questions
Kegiatan Ramadhan dan Kesehatan
Quiz
•
4th Grade - University
10 questions
Ice Breaking Informatika
Quiz
•
10th Grade - University
20 questions
TIK KELAS 9
Quiz
•
9th Grade - University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
8 questions
2 Step Word Problems
Quiz
•
KG - University
10 questions
Martin Luther King, Jr. For Kids
Interactive video
•
1st - 12th Grade
10 questions
Dr. King's Speech and Its Impact
Interactive video
•
7th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
7 questions
Anti-Bullying ARS 15-341
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
15 questions
TSI Math Practice Questions
Quiz
•
8th - 12th Grade
24 questions
Identify Properties of Polygons and Quadrilaterals
Quiz
•
9th - 12th Grade
