+ 1

 What is run-time error, logical error and syntax error?

Can any one please help me to differentiate between these error in C++ or explain what these are?

19th Jul 2017, 5:17 AM
Prajwal W
Prajwal W - avatar
1 Answer
+ 18
Runtime: The program compiles, but something happens during execution that can crash it. Ex: Assigning a string to an int. Logical: The program compiles and executes successfully, but the output is incorrect. Ex: If you got a math formula or algorithm incorrect. Syntax: Some part of the code was written wrong, and the code can't compile until it's fixed. Ex: If you misspelled a keyword, or used a colon instead of a semicolon to end a statement.
19th Jul 2017, 6:01 AM
Tamra
Tamra - avatar