Working Code(verified)

Add printf when where ever required. Good data
Merge pull request #8 from ksskarthik/patch-4

Working Code(verified)