Arduino Variable Data Type?
For the situation illustrated in the question – displaying data – polymorphic functions already exist, and might as well be used in this case.  Specifically, use the Streaming.h contributed library.  It adds some “syntactic sugar” to Arduino C.  At compile time it converts C++-like &lt;&lt; Serial stream operators to Serial.print statements, without increasing code size.  You can install it via Streaming5.zip from arduiniana.org .

In other cases, a union data structure allows treating an area of memory different ways.  Wikipedia's Union type article explains the general idea.  See eg tutorialspoint.com/cprogramming for union syntax and usage.  For some reason, arduino.cc's Language Reference page hasn't got union on its list of language features.  However, mcgurrin.com has a page called There is Power in a Union that codes a simple Arduino C example two ways (where bearing is an int):

higherByte = compass.read();
lowerByte = compass.read();
bearing = ((higherByte&lt;&lt;8)+lowerByte)/10


-vs-

union Data {
  byte b[2];
  int value;
};
...
union Data data;
data.b[0] = compass.read();
data.b[1] = compass.read();
bearing = data.value/10;