
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
15 questions
Fungsi Input dan Output dalam C

Quiz
•
12th Grade
20 questions
Pengenalan Bahasa Pemrograman Python

Quiz
•
9th Grade - University
10 questions
Pemrograman & Aplikasi Mikrokontroler (Pengenalan IDE)

Quiz
•
11th Grade - University
10 questions
Latihan Soal #1

Quiz
•
12th Grade
15 questions
Pemrograman Visual dan Scratch

Quiz
•
7th Grade - University
10 questions
LD siskom SE

Quiz
•
10th Grade - University
10 questions
1.2 Algoritma SK T4

Quiz
•
9th Grade - University
20 questions
perangkat input,output, proses

Quiz
•
10th Grade - University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Information Technology (IT)
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
6 questions
Maier - AMDM - Unit 1 - Quiz 1 - Estimation

Quiz
•
12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade
21 questions
9th Grade English Diagnostic Quiz

Quiz
•
9th - 12th Grade
7 questions
Characteristics of Life

Interactive video
•
11th Grade - University