If you are interested, here is a typical chunk of code doing what you require.
You should be able to adapt it to your needs.
void DisplayDebugInfo( void )
{
// update DEBUG info to the screen
char TempStr [ 128 ];
sprintf_s( TempStr, 128, "FPS: %d", dbScreenFPS( ) ); dbText( 0,0,TempStr );
sprintf_s( TempStr, 128, "World X Location: %f",Aircraft[iThisMachinePlayerID].fPosX ); dbText( 0,10,TempStr );
sprintf_s( TempStr, 128, "World Z Location: %f",Aircraft[iThisMachinePlayerID].fPosZ ); dbText( 0,20,TempStr );
sprintf_s( TempStr, 128, "Terrain height: %f", fCurrentTerrainHight ); dbText( 0,30,TempStr );
sprintf_s( TempStr, 128, "Hight above Ground: %f", fCurrentAircraftGroundHeight ); dbText( 0,40,TempStr );
sprintf_s( TempStr, 128, "Elevator: %d", Aircraft[iThisMachinePlayerID].iElevator ); dbText( 0,50,TempStr );
sprintf_s( TempStr, 128, "Aileron: %d", Aircraft[iThisMachinePlayerID].iAileron ); dbText( 0,60,TempStr );
sprintf_s( TempStr, 128, "Rudder: %d", Aircraft[iThisMachinePlayerID].iRudder ); dbText( 0,70,TempStr );
sprintf_s( TempStr, 128, "Throttle: %d", Aircraft[iThisMachinePlayerID].iThrottle ); dbText( 0,80,TempStr );
sprintf_s( TempStr, 128, "Guns: %d", Aircraft[iThisMachinePlayerID].iTriggerA ); dbText( 0,90,TempStr );
sprintf_s( TempStr, 128, "Bullet Count: %d", iNextRealBullet ); dbText( 0,100,TempStr );
sprintf_s( TempStr, 128, "cat: %d", cat ); dbText( 0,110,TempStr );
sprintf_s( TempStr, 128, "Bullet X Location: %f",RealBullet[0].fPosX ); dbText( 0,120,TempStr );
sprintf_s( TempStr, 128, "RotationY: %f", Aircraft[iThisMachinePlayerID].fRotY ); dbText( 0,140,TempStr );
}
EDIT: you will have to do a copy and paste back into your VisualC++ IDE to get the correct formatting of the code back. It looks like this code windows can not handle code that long on a line.