Tipe Data Pada C++

Setiap tipe data pada bahasa pemrograman tertentu pastilah memiliki range atau jangkauan tertentu.

Berikut adalah video yang menjelaskan tentang range tipe data pada C++ dan penggunaannya.

Selamat Menyaksikan.

Berikut adalah source code yang digunakan dalam video tersebut.

/* Modul 2-5 : Latihan Tipe Data
Nama : Wayan Widya Artana
NRP  : 49013035
*/

#include <iostream>
#include <limits>

using namespace std;

int main(){

cout<<“Praktikum Pemrograman Visual C++”<<endl;
cout<<“Dikerjakan Oleh : Wayan Widya Artana”<<endl;
cout<<”           NRP  : 49013035″<<endl;
cout<<“=====================================”<<endl;
cout<<”               TIPE DATA”<<endl;
cout<<“=====================================”<<endl;

cout<<“Minimum char = “<<CHAR_MIN<<endl;
cout<<“Maximum char = “<<CHAR_MAX<<endl;
cout<<“Minimum signed char = “<<SCHAR_MIN<<endl;
cout<<“Maximum signed char = “<<SCHAR_MAX<<endl;
cout<<“Maximum unsigned char = “<<UCHAR_MAX<<endl;
cout<<“Minimum short = “<<SHRT_MIN<<endl;
cout<<“Maximum short = “<<SHRT_MAX<<endl;
cout<<“Minimum int = “<<INT_MIN<<endl;
cout<<“Maximum int = “<<INT_MAX<<endl;
cout<<“Minimum long = “<<LONG_MIN<<endl;
cout<<“Maximum long = “<<LONG_MAX<<endl;
cout<<“Maximum unsigned short = “<<USHRT_MAX<<endl;
cout<<“Maximum unsigned = “<<UINT_MAX<<endl;
cout<<“Maximum unsigned long = “<<ULONG_MAX<<endl;

return 0;
}


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