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

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,


I can not get my C++ program to work right. It is supposed to tell if a word is a palindrome or not, but it only tells thet the word is not a palindrome. And I can't fix it.

1 Answers  


class test { int a; public: test(int b):a(b){} void show(){ cout<<a; } }; void main() { test t1; test t2(5); t1.show(); t2.show(); } }

1 Answers  


How to create a program that lists countries capitals when country is entered? (Terribly sorry, I'm a complete novist to coding with C, am looking for inspiration and general tips on how to code and create this program.)

0 Answers  


void main() { for(int i=0;i<5;i++); printf("%d",i); } What is the output?..

32 Answers   College School Exams Tests, CTS, HCL, iGate, SmartData,






what is the large sustained error signal that eventually cause the controller output to drive to its limit

1 Answers   TCS,


How to reverse a linked list without using array & -1? Thank you.

2 Answers   Access, Satyam,


How to develop a program using C language to convert 8-bit binary values to decimals. TQ

1 Answers   Amazon,


Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has already been declared, use a do...while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j .

2 Answers  


how to convert decimal to hexadecimal without using arrays just loops

2 Answers  


Write a program to accept two strings of Odd lengths. Then take all odd characters from one string and even characters from the other and concatenate and produce a string.

1 Answers  


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

4 Answers  


Categories