maybe GrumpyMike's 82Ohm r better, but they bring u slightly above the absolute maximum rating of 60mA forward current for the IR emitter
1.5V forward volts drop, so 5 - 1.5V = 3.5V across the resistor.
So with 82R that is 3.5/82 = 43mA which is a safe place to run a 60mA max diode.
s it also ok to feed the output of the sensor into the digital pin of arduino deicimila?
It won't do any harm but will do little good as you don't get a strong signal without any amplification and so you will not swing between the logic levels.
do you have any codes for this
No, the code is not complected, it is trivial and if you can't write it you don't deserve to pass.
Take a reading, compare it to some threshold value, if it is above then light the LED otherwise turn it out. Three lines maximum and another one in setup() defining an output pin. If you can't write 4 lines then resit the class.