fixed types of expressions using pointers and printing with a new line