Computer Science, asked by TbiaSamishta, 1 year ago

What are different errors encountered while compiling?

Answers

Answered by keerthika6
0

Compile errors are those errors that occur at the time of compilation of the program. C compile errors may be further classified as:

Syntax Errors

When the rules of the c programming language are not followed, the compiler will show syntax errors.

For example, consider the statement,

1 int a,b:

The above statement will produce syntax error as the statement is terminated with : rather than ;

Semantic Errors

Semantic errors are reported by the compiler when the statements written in the c program are not meaningful to the compiler.

For example, consider the statement,

1

b+c=a;

In the above statement we are trying to assign value of a in the value obtained by summation of b and c which has no meaning in c. The correct statement will be

1

a=b+c;

Answered by shashank567
0
Logical Errors : On compilation and execution of a program, desired output is not obtained when certain input values are given. These types of errors which provide incorrect output but appears to be error free are calledlogical errors. These are one of the most common errors done by beginners of programming.
Similar questions