oh sorry.
it was a typo in my above post.

It doesn't work with %ld too . in scanf !!