C compiler is pretty vague in many aspects of checking program correctness, particularly in type checking. Careful use of prototyping of functions can assist modern C compilers in this task. However, there is still no guarantee that once you have successfully compiled your program that it will run correctly.
The UNIX Lint tool Secure Programming Lint (SPLINT), can assist in checking for a multitude of programming errors. Check out the online manual pages (man splint) for complete details of the splint.
To run splint simply enter the command:
Splint is particularly good at checking type checking of variable and function assignments, efficiency, unused variables and function identifiers, unreachable code and possible memory leaks. There are many useful options to help control splint (see man splint).
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- C program to print a string without any quote (singe or double) in the program
- Hello World Program : First program while learning Programming
- C program to detect tokens in a C program
- How to compile 32-bit program on 64-bit gcc in C and C++
- How does a C program executes?
- Output of C Program | Set 29
- Program to compute Log n
- Program error signals
- Program to check if two strings are same or not
- OpenMP | Hello World program
- C program for pipe in Linux
- Write a C program that won't compile in C++
- Program to print last 10 lines
- Quine - A self-reproducing program
- C program to delete a file
- Program to validate an IP address
- Program for Sum of the digits of a given number
- C Program to find size of a File
- LEX program to add line numbers to a given file
- C program to check if a given string is Keyword or not
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.