#include <stdio.h>
 
int main()
{
        int a = 100;

	double b = static_cast<float>(a); // ok
        double b1 = (float)a;    // c-cast a->float == ok, implicit static_cast here

	// unsigned char const * c = a; // illegal, need casting
        //unsigned char const * c = static_cast<unsigned char const *>(a); // illegal cast, incompartible types
	unsigned char const * c = reinterpret_cast<unsigned char const *>(a); // ok
	unsigned char const * c1 = (unsigned char const *)(a); // c-cast 100->pointer == ok, implicit reinterpret_cast here

	// unsigned char * d = c; // illegal, stripping const
	unsigned char * d = const_cast<unsigned char *>(c); // ok
        unsigned char * d1 = (unsigned char *)c; // c-cast const -> non-const == ok, implicit const_cast here


        printf("%d, %f, %x, %x", a, b, c, d);
        return 0;
}