What is the difference between "Run time error" and "Compile error"? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 11

What is the difference between "Run time error" and "Compile error"?

All languages.

8th Jun 2017, 1:03 AM
BENOTMANE
BENOTMANE - avatar
9 ответов
+ 17
If the compiler, e.g., gcc, finds an error, you are lucky. It does the debugging for you and tells you what is wrong. Otherwise, you run a test and the program gives you a wrong result (called a logic error), hangs or crashes. Now, you need to debug.
8th Jun 2017, 1:09 AM
Bulent Basaran
Bulent Basaran - avatar
+ 15
Compilation errors are mistakes in the grammar of the program. They are things like missing braces, mismatched types, etc. Runtime errors see those that are a bit deeper: your code compiles fine, but there is an weep in how you're doing things. Referencing a null pointer, dividing by zero, not catching an exception, etc are the more common ones. There are techniques to reduce the occurrence of these errors, but ime you never stop making them (you just change which pits you fall in over time).
8th Jun 2017, 1:11 AM
Jim
Jim - avatar
+ 8
hi, Compile time error is any type of error that prevent a java program. compile like a syntax error, a class not found, a bad file name for the defined class, a possible loss of precision when you are mixing different java data types and so on. A runtime error means an error which happens, while the program is running.
8th Jun 2017, 1:47 AM
Nanda Balakrishnan
+ 7
Compile time  error is any type of that prevent a java program like a syntax , a class not found, a bad file name for the defined class, a possible loss of precision when you are mixing different java data types and so on. A  run error means an  which happens, while the program is running.
8th Jun 2017, 4:49 PM
💞ⓢⓦⓐⓣⓘ💞
💞ⓢⓦⓐⓣⓘ💞 - avatar
+ 4
run time errors occurs due to any logical mistakes and even the unexpected output fall under this category..in this case, your code doesn't have any mistake except the logical part. compile time error comes when there is any syntax error or when you violate the rules of variable and method usage. this error is identified once when you compile your code and it won't produce output until the error is rectified.
8th Jun 2017, 6:20 AM
Code Learner
Code Learner - avatar
+ 4
Run time error is an error that occurs during execution of the program like referencing unavailable memory locations so now your memory location cannot be identified while compile error is an error that occurs due to problems with the writing of the code so now it cannot be run e.g ommission of termination symbols...
9th Jun 2017, 3:20 AM
Ian
Ian - avatar
+ 2
Compile erros are wrong syntax commonly Run Time errors are memory violation, files
8th Jun 2017, 1:45 AM
Andrés04_ve
Andrés04_ve - avatar
+ 2
complie time error is error in ur code run time is error in logic as Andres Eduardo Goncalves says !!
8th Jun 2017, 7:06 AM
α૨α√iทđ
α૨α√iทđ - avatar