What do you mean by Syntax errors and Semantic errors?
Syntax errors occur when rules of a programming language are missed.
(eg) int a,b //missing semicolon.
Semantic errors occur when statements are not meaningful.
(eg) X*Y = Z;