What is Arduino's default pinout state in pinmode output?

I needed to toggle the pinmode between input and output, and I was wondering if anyone knew what the default pinout state would be if I switched to output? Same as the last time it was set, always defaults to low, or always default to high?

void setup()
{
pinMode(05, OUTPUT); // sets the digital pin as output
digitalWrite(05, HIGH); // sets the output on
pinMode(05, INPUT); // sets the digital pin as input
delay(1000); // waits for a second for no reason.
pinMode(05, OUTPUT); // sets the digital pin as output
}

Would it be the same as previously set? Or would it only default to specific state?

void setup()
{
  pinMode(05, OUTPUT);      // sets the digital pin as output
  // LOW 
  digitalWrite(05, HIGH);   // sets the output on
  // HIGH
  pinMode(05, INPUT);      // sets the digital pin as input
  // INPUT with PULLUP enabled
  delay(1000);                  // waits for a second for no reason.
  pinMode(05, OUTPUT);      // sets the digital pin as output
  // HIGH
}

I think the following explains it well.