OpenGL fragment shader not working on core i5 laptop on windows7

Hi all,
I am new to OpenGL development. I am trying to work with some sample examples of OpenGL.
In one example, i am trying to change colour of triangle through fragment shader but it is not reflecting in final output.

I have tested same program on two machines with following configurations:
1) windows 7 on core i5 CPU-- not working
2) windows 7 on core i5-2540M CPU -- working

OK, your first machine only supports GLSL 120 and your second GLSL 140, but you're requesting support for 330 in your shader - which is why it doesn't work. It shouldn't work on the second one either, but we can probably put that down to driver weirdness.

You're should bump your OpenGL usage down to GL2.1 and GLSL 120 if you want it to work on both, as the hardware on the first machine just isn't capable of higher (and this is a hardware limitation, nothing to do with software).