Google tag (gtag.js)

Programming Errors

Hey there my self Govinda Kumar Singh . Currently i am in Sem 4 (BCA) DSPMU Ranchi. This is my first blog on this platform.

Today i am going to share information about Programming Errors and it's types .

So basically there are mainly three types of programming errors .

> Syntax Error / Compile- Time Error

> Run-Time Error

> Logical Error


* Syntax Error *

- Errors that are detected by the compiler are called syntax error. Syntax Errors result from errors in code construction , such as mistyping a
keyword , using an opening brace without a corresponding closing brace.
These type of errors are usually easy to detect because the compiler tells us where they are and what caused them.

let's see an example of syntax error

1. #include
2. int main()
3. {
4. printf("Hello Tech Talk Community)
5. return 0;
6. }

In above example , We can see that in line no. 4 string Hello Tech Talk Community should be closed with a closing quotation mark.
And in the same line semicolon is missing after end of statement.


* Runtime error *

- Runtime errors are errors that causes a program to terminate abnormally . They occur while a program is running if the environment
detects an operation that is impossible to carry out.
- Input mistakes typically causes runtime errors.
- An input error occur when the program is waiting for the user to enter a value, but user enter enters a value that the program cannot
handle.

For example , if the program expects to read a number , but instead the user enters a character strings , this causes data-types errors to
occur in the program.


* Logical Error *

- Logical errors occur when a program does not perform the way we accepted to. Error of this kind occurs for many reasons . For example
suppose we wrote the program to convert Celsius to Fahrenheit

1. #include
2. int main()
3. {
4. int result;
5. printf("Celsius 35 in Fahrenheit degree ");
6. result=( ( 915*35)+32 );
7. printf("%d",result);
8. return 0;
9. }

The output is 67 which is not true .
In above example we make mistake in logic part of the program.

Remember there can be other types of programming errors like semantic errors, Linker errors.

I hope you liked this blog and learnt something from it.
Thank you.
And Special thanks to Tech Talk Community.

0 comments
author
Sachin Kumar mandal 4 months ago
Liked by Author

Good keep it up 👍

author
Suryansh Singh 4 months ago
Liked by Author

Nice concept 💯👍

author
Ujwal Rathor 4 months ago
Liked by Author

Excellent tips on debugging