What are the different types of errors in C and when they occur?

Answers were Sorted based on User's Feedback



What are the different types of errors in C and when they occur?..

Answer / pavan_mustyala

1. Syntax Errors: Error found during compilation e.g.
missing semi colon, missing comma, undeclared identifier,
etc

2. Semantic Errors: Logical error in the program due to
which functionality behaves differently than expected.

3. Runtime Errors: Exceptions due to insufficient memory
and Segmentation fault, stack over flow, etc.

Is This Answer Correct ?    70 Yes 12 No

What are the different types of errors in C and when they occur?..

Answer / sivavendra

compilation errors(occurs during compilation) and runtime errors(occurs during runtime)...

Is This Answer Correct ?    27 Yes 9 No

What are the different types of errors in C and when they occur?..

Answer / vishwjeet singh

PROTOTYPE ERROR:when any header file is missing then we error hat was shown by compilling the program is prototype error.
SYNTEX ERROR: Actually these type of errors occured when
programmer misses the syntax.(Syntsx: (,),(.),(;),("") etc.)
Example:- printf("your sum is %d"c);
This may occure error "Syntax error".
Right Syntax is:printf("your sum is %d",c);

SYSTEMATIC ERROR:These type of errors occure when there is a
missmatch of functionallity.
Example: int sum is;
this may occure error because while declaring a variable c
is not allowed space( ).
Right Syntax is: int sum_is;

RUNTIME ERROR: Thes etype of errors also known as "linker
errors".These type of errors occure after compilation.This
will not give you the line where these type of errors occured.

Is This Answer Correct ?    22 Yes 4 No

What are the different types of errors in C and when they occur?..

Answer / sudhir seth

Syntax errors: Actually these type of errors occured when
programmer misses the syntax.(Syntsx: (,),(.),(;),("") etc.)
Example:- printf("your sum is %d"c);
This may occure error "Syntax error".
Right Syntax is:printf("your sum is %d",c);

Symmentic errors:These type of errors occure when there is a
missmatch of functionallity.
Example: int sum is;
this may occure error because while declaring a variable c
is not allowed space( ).
Right Syntax is: int sum_is;

Runtime errors: Thes etype of errors also known as "linker
errors".These type of errors occure after compilation.This
will not give you the line where these type of errors occured.

Is This Answer Correct ?    22 Yes 9 No

Post New Answer

More C C++ Errors Interview Questions

Write a c-programe that input one number of four digits and find digits sum?

2 Answers  


How to upgrade LOOP environment, I just mean, how can i make loop statement editable ? I just try some program using loop statement and checking it in multiple compilers. Every compiler showing different output, what's the wrong ? is it a compiler based problem, or loop based problem, tell me why ? and what will be the debugging process, for this kind of problem ?

1 Answers  


what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }

4 Answers  


printy(a=3,a=2)

3 Answers  


What is the code for following o/p * * * * * * * * * * * * * * * *

1 Answers  






how tally is useful?

2 Answers  


#include<stdio.h> void main() { int i=1; printf("%d%d%d",i++,++i,i); }

19 Answers  


What is probability to guarantee that the task a programmer is going to create will be created and be able to run on a particular system (RTOS/GPOS).

0 Answers  


main() { char c; for(c='A';c<='Z';c++) getch(); }

9 Answers  


To generate the series 1+3+5+7+... using C program

18 Answers  


void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?

24 Answers   HCL,


UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....

5 Answers  


Categories