Pemrograman Bahasa C

Tipe data dalam bahasa C

Berikut ini adalah tipe data yang biasa digunakan dalam pemrograman Bahasa C

Tipe data Keyword Rentang Nilai (GCC)
Character Char –128 s.d. 127
Short integer Short –32.768 s.d. 32.767
Integer Int –2.147.483.648 s.d. 2.147.483.647
Long integer Long –2.147.483.648 s.d. 2.147.483.647
Long-long integer long long –9.223.372.036.854.775.808 s.d. 9.223.372.036.854.775.807
SP loating point Float 1.17 x 10–38 s.d. 3.4 x 1038
DP floating point double 2.22 x 10–308 s.d. 1.79 x 10 308

Backslash constant character

Berikut adalah tabel konstanta yang biasa digunakan dalam bahasa C

Code Meaning
\b Backspace
\f Form feed (ganti halaman)
\n New line (baris baru)
\r Carriage return (ke awal baris)
\t Horizontal tab
\” Double quote
\’ Single quote
\ \ Backslash
\v Vertical tab
\a Alert (bunyi speaker)
\? Question mark (karakter tanda tanya)
  Character dengan nilai ASCII 0
Advertisements

Posted on July 30, 2011, in Programming and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: