actually im reading "Software engineering in c" by peter darnell. its pretty basic. It was because I was reading this that this problem arised. Thanks every one for the detailed explanation.