Vous êtes sur la page 1sur 3

Nama : Eric Liputra / 52012011 Kelas : Teknik Informatika / TI1

Algoritma & Pemrograman II Bahasa C


1. Variabel Bentuk umum : <tipe_data> <Nama_variabel>; Contoh : int umur; 2. Konstanta Bentuk I : Bentuk umum : #define <nama_konstanta> <nilai> Contoh : #define pi 3,14, #define nama Eric Liputra Bentuk II : Bentuk Umum : const <tipe_data> <nama_konstanta> = <nilai>; Contoh : Const float phi : 3.14; Arti Bunti Bel (Speaker Komputer) Mundur satu spasi (Backspace) Ganti halaman (Form Feed) Ganti baris baru (New Line) Menuju kolom pertama baris yang sama (Carriage Return) Tabulasi horizontal Tabulasi vertical Nilai kosong (Null) Karakter petik tunggal Karakter petik ganda Garis miring terbalik (Back Slash)

3. Karakter Escape Karakter


\a \b \f \n \r \t \v \o \ \ \\

4. Operator Kategori Arithmetic Logical (Boolean and bitwise) String concatenation Increment - Decrement Shift Relational Asignment Operator
& | + - * / % ~ && || true false + ++ -<< >> == != < > <= >= += -= *= /= %= &= |= ^= <<= >>= ^ !

5. Operator 2 Kategori Member Access Indexing Cast Conditional Delegate concatenation and removal Type Information Overlow Exception Control Indirection and Address 6. Printf Menampilkan hasil terformat Operator
. [ ] ( ) ?: + As Is SizeOf TypeOf Checked Uncheked * -> [ ] &

7. Integer Terformat

8. Bilangan Pecahan

9. Scanf Menginput data terformat

10. Nilai Numerik o Menggunakan %d untuk integer o Menggunakan %i untuk integer o Menggunakan %ld atau %li untuk long integer o Menggunakan %f untuk double dan float o Menggunakan %le atau %lf dan %lg untuk long double

Vous aimerez peut-être aussi