Problem with printing float to Serial Monitor

Hello!
I am trying to print the resistance of an LDR to the Serial Monitor as a float like this:

float resistance;
word RawADC;
char output[40];
void setup(){
  analogReference(EXTERNAL);
  Serial.begin(9600);
}
void loop(){
  RawADC = analogRead(A0);
  resistance = 10240000.0/RawADC - 10000.0;
  sprintf(output, "ADC: %d\tResistance: %.2f\n", RawADC, resistance);
  Serial.print(output);
  delay(1000);
}

I used sprintf() for the conservation of space. However, this is the output:

ADC: 687	Resistance: ?
ADC: 687	Resistance: ?
ADC: 687	Resistance: ?
ADC: 688	Resistance: ?
ADC: 693	Resistance: ?
ADC: 692	Resistance: ?
ADC: 692	Resistance: ?

Why isn't the float printing correctly? How can I get sprintf() to correctly print the resistance to the char buffer with two digits after the decimal point?

If I download a program onto the Arduino using Arduino 1.0.1 that prints stuff to the Serial Monitor, move the Arduino to a different computer with Arduino 0023, will I still be able to download programs, and see the correct output on the Serial Monitor?
Thanks!

The Arduino version of sprintf() doesn't support floats.

I used sprintf() for the conservation of space

?
There's 13.5 billion light years of space - what about it needs to be conserved?

Why "word"?

Why not Serial.print?

Why the odd scope?

AWOL:
There's 13.5 billion light years of space - what about it needs to be conserved?

I don't like crammed or repetitive code. You know that I am talking about space in the IDE.

AWOL:
Why "word"?

The word datatype is equivalent to unsigned int. analogRead() does not go into negative. What is wrong with that?

AWOL:
Why not Serial.print?

I did use Serial.print().

Oh well, I'll just do this. It is for the carbon dioxide project tomorrow. Why can't sprintf() do floats in Arduino?

float resistance;
word RawADC;
void setup(){
  analogReference(EXTERNAL);
  Serial.begin(9600);
}
void loop(){
  RawADC = analogRead(A0);
  resistance = 10240000.0/(float)RawADC - 10000.0;
  Serial.print("ADC: ");
  Serial.print(RawADC);
  Serial.print("\tResistance: ");
  Serial.println(resistance);
  delay(1000);
}

Why can't sprintf() do floats in Arduino?

It was removed, for the conservation of space.

I believe you can use dtostrf().

You know that I am talking about space in the IDE.

I run my IDE on a machine with at least 4GB of RAM - why should I care how much memory the IDE takes?

If you've got a number that can't exceed 1/30th the range for an int, why bother worrying about size?

If you use Serial.print, you'll know it works for floating point types.

Sprintf takes bucket-loads of RAM to work properly.

Why global scope?

AWOL:
I run my IDE on a machine with at least 4GB of RAM - why should I care how much memory the IDE takes?

Stop arguing about memory. It is just the look (I don't like repetitive code). Not memory. My computer only has 2GB RAM.

I'm not worrying about size.

Thank you.

I'm not worrying about size.

It's not important.

Why global scope?

AWOL:
Why global scope?

What is wrong with that? I've seen examples that do global scope for these types of variables!

P.S. You cross-posted.

P.S. You cross-posted.

Where?

Cross-posting means posting the same thing in separate threads.
I removed your taunt.
No offence.