#include <iostream.h> #include<conio.h> union chng_byte { void chng(); void set_byte(unsigned short i); void show_word(); unsigned short u; unsigned char c[2]; }; void chng_byte::chng() { unsigned char t; t=c[0]; c[0] = c[1]; c[1] = t; } void chng_byte::show_word() { cout <<u; } void chng_byte::set_byte(unsigned short i) { u =i; } void main() { clrscr(); chng_byte s; s.set_byte( 49034); s.chng(); s.show_word(); getch(); } Output : 35519