answersLogoWhite

0

Compile time errors are detected at the compilation of a program. These are usually syntactical errors. A program cannot be compiled and hence executed if it contains a compile time error.

for example,

int a b=0;

above statement will produce a compile time error as a and b must be separated by a comma(,).

Runtime errors are logical errors. They don't affect the compilation of the program but causes a program to produce unwanted output. The program becomes buggy.

for example,

sum=sum-a[i];

in above statement, no syntactical error is present and hence the program will get executed successfully. But from a logical point of view, sum was supposed to be the addition of array elements. using minus(-) instead of plus(+) will give unwanted or incorrect output.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the difference between compile time and run time polymorphism?

Runtime prolymorphism means overriding compiletile polymorphism means overloading


What is the difference between design time run time and break time?

Assuming you are refering to software development: Design time - Prior to compile Run time - After compile, while program is running Break time - Pausing the execution of code during the debugging process


What is the difference between run-time error and compile error?

A run-time is an error that occurs when the program is executing (running). This is where segfaults and other horrible things happen. A compile-time error is an error that occurs when you are compiling the code. This is where code syntax and semantics are checked. You want errors to only occur here.


Is overriding done at compile time or run time?

compile time


What is the difference between compile-time error and the run-time error?

A run-time is an error that occurs when the program is executing (running). This is where segfaults and other horrible things happen. A compile-time error is an error that occurs when you are compiling the code. This is where code syntax and semantics are checked. You want errors to only occur here.


What is compile time and run time?

Compile time is when the compiler translates your source code into computer language. Run time is when the actual program runs.


Difference between statically typed language and dynamically typed language?

Statically typed languages check type of variable at Compile time vs Dynamically typed language check type at run time


What is run time?

"run time" is the opposite of "compile time". It refers to the time when the program is actually running.


What is the difference between static memory versus dynamic memory?

Dynamic memory can be declared at run-time using the new and delete operators (or malloc and free in C), while static memory must be declared at compile-time.


Global variable conflict is at compile time or run time?

Linkage time.


Difine run time error?

run-time error definition. An error in the execution of a program which occurs at run time, as opposed to a compile-time error. A good programming language should, among other things, aim to replace run-time errors by compile-time errors.


What does runtime mean?

actually the run time means at the time of executing the program. that means if you write a program and you compile it and you need to execute then during the compilation it is called compile time and during the execution it is called run time .