Code compiles, Is it logically correct?

Printable View