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 down the difference between c. Loop and goto statement d. (!0) and (!1) e. (1= =! 1) and (1!=1) f. NULL and !NULL

0 Answers  


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

4 Answers  


#include"stdio.h" #include"conio.h" void main() { int a; printf("\n enter a number:"); scanf("%c\n"); getch(); }

12 Answers   HCL,


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

9 Answers  


Declaration of Cube Guys please help me.. Is this a right way to declare cube.? If i Compile it. It Says: Cube undeclared what should i do? Please help \thanks in advanced #include<stdio.h> #include<math.h> #include<conio.h> main( ) { float x,y; while(x++<10.0) { printf("Enter Number:"); scanf("%d", &x); y = cube(x); printf("%f %f %f \n", x,pow(x,2),y); cube(x); } { float x; float y; y = x*x*x; } getch(); return (y); }

2 Answers  






Assume that the int variables i and j have been declared, and that n has been declared and initialized. Write code that causes a "triangle" of asterisks of size n to be output to the screen. Specifically, n lines should be printed out, the first consisting of a single asterisk, the second consisting of two asterisks, the third consistings of three, etc. The last line should consist of n asterisks. Thus, for example, if n has value 3, the output of your code should be * ** *** You should not output any space characters. Hint: Use a for loop nested inside another for loop.

2 Answers   HCL,


full c programming error question based problem

3 Answers   HCL, TCS,


what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?

2 Answers   TCS,


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

4 Answers  


Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;

3 Answers  


void main() { int i=5; printf("%d",i+++++i); }

14 Answers   HCL,


write a profram for selection sort whats the error in it?

2 Answers  


Categories