Code Snippets tried by me using C++(4.8.1)