
Pemrograman C: printf dan scanf

Quiz
•
Information Technology (IT)
•
12th Grade
•
Medium
Zunny Hidayatulloh
Used 5+ times
FREE Resource
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);
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Pemahaman Berfikir Komputasional

Quiz
•
9th Grade - University
15 questions
Викторина по языку программирования Си

Quiz
•
12th Grade
10 questions
Uji Pemahaman Berpikir Komputasioal

Quiz
•
8th Grade - University
20 questions
Proses Komputasional dan Pseudocode

Quiz
•
10th Grade - University
20 questions
DASAR KONSENTRASI KEAHLIAN

Quiz
•
12th Grade
10 questions
Quiz konsep Algoritma

Quiz
•
11th Grade - University
10 questions
Berpikir Komputasional (BK)

Quiz
•
8th Grade - University
10 questions
Koding dan AI untuk Siswa Kelas 5

Quiz
•
5th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade
15 questions
ACT Math Practice Test

Quiz
•
9th - 12th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade