Presentation is loading. Please wait.

Presentation is loading. Please wait.

Union, bitfield, typedef, enum union nama_u{ ------ }; union nama_u{ ------ struct nama_s byte; ------ }; enum{ }; Tipedef var BYTE.

Similar presentations


Presentation on theme: "Union, bitfield, typedef, enum union nama_u{ ------ }; union nama_u{ ------ struct nama_s byte; ------ }; enum{ }; Tipedef var BYTE."— Presentation transcript:

1 union, bitfield, typedef, enum union nama_u{ ------ }; union nama_u{ ------ struct nama_s byte; ------ }; enum{ }; Tipedef var BYTE

2 Contoh 1 #include void main() { union { unsigned int di; unsigned char dc[2]; }bil_x; bil_x. di=321; cout< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/12/3782552/slides/slide_2.jpg", "name": "Contoh 1 #include void main() { union { unsigned int di; unsigned char dc[2]; }bil_x; bil_x.", "description": "di=321; cout<

3 contoh2 #include void main() { Struct info_byte { unsigned bit0 :1; unsigned bit1 :1; unsigned bit2 :1; unsigned bit3 :1; unsigned bit4 :1; unsigned bit5 :1; unsigned bit6 :1; unsigned bit7 :1; }; union { unsigned char karakter; struct info_byte byte; }ascii; ascii.karakter = ‘A’; cout< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/12/3782552/slides/slide_3.jpg", "name": "contoh2 #include void main() { Struct info_byte { unsigned bit0 :1; unsigned bit1 :1; unsigned bit2 :1; unsigned bit3 :1; unsigned bit4 :1; unsigned bit5 :1; unsigned bit6 :1; unsigned bit7 :1; }; union { unsigned char karakter; struct info_byte byte; }ascii; ascii.karakter = ‘A’; cout<

4 #include void main() { enum manusia { pria, wanita}; enum manusia jenis_k; jenis_k=pria; cout< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/12/3782552/slides/slide_4.jpg", "name": "#include void main() { enum manusia { pria, wanita}; enum manusia jenis_k; jenis_k=pria; cout<

5 #include typedef unsigned char BYTE; BYTE beri_nilai(void); void main() { BYTE kode; Kode=beri_nilai(); cout<<“Kode =“< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/12/3782552/slides/slide_5.jpg", "name": "#include typedef unsigned char BYTE; BYTE beri_nilai(void); void main() { BYTE kode; Kode=beri_nilai(); cout<< Kode = <


Download ppt "Union, bitfield, typedef, enum union nama_u{ ------ }; union nama_u{ ------ struct nama_s byte; ------ }; enum{ }; Tipedef var BYTE."

Similar presentations


Ads by Google