Hi Sriharsha,
>It was sev faulting when Im trying to pass this value to a function (printf or any other user-defined function). Thats what I dont understand....
That's usually an indicator that the available STACK is being exceeding.
(It was only a couple decades ago that I had to work with a 256 byte stack. Times changes.)
--Eljay