What are the different types of errors in C and when they occur?
Answers were Sorted based on User's Feedback
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 |
Answer / sivavendra
compilation errors(occurs during compilation) and runtime errors(occurs during runtime)...
Is This Answer Correct ? | 27 Yes | 9 No |
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 |
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 |
Write a c-programe that input one number of four digits and find digits sum?
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 ?
what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }
printy(a=3,a=2)
What is the code for following o/p * * * * * * * * * * * * * * * *
how tally is useful?
#include<stdio.h> void main() { int i=1; printf("%d%d%d",i++,++i,i); }
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).
main() { char c; for(c='A';c<='Z';c++) getch(); }
To generate the series 1+3+5+7+... using C program
void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?
UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....