Tag: Source Code

Selecting the best Static Code Analysis and Review Tools

This article will list the top 10 source code analysis and code review tools that I have used throughout my 13+ years in the software development field. These tools are also known as Static Application Security Testing (SAST) Tools and can help analyze source code or compiled programs. Most developers use static analysis tools that are plugged into their development environments, such as Visual Studio, Eclipse, or other IDE consoles.

Read More

Errors: To Fail or To Recover?

The environment in which your code runs is imperfect: users will provide invalid inputs, external systems will go down, and your code and other code around it will often contain some number of bugs. Given this, errors are inevitable; things can and will go wrong, and as a result you can’t write robust and reliable code without thinking carefully about error cases.

Read More

C++ Program to solve the Quadratic Equation

This program will solve quadratic equations. It accepts coefficients of a quadratic equation from the user i.e. a, b and c and displays the roots. To compile the program name it quadratic_solver.cpp then type g++ -o quadratic_solver quadratic_solver.cpp You may need to use math.h like this: #include if you are using windows C++ programming software. (I tried it without the math.h and got an “undeclared identifier” error)

Read More

C Algorithms Library

This article is about a collection of common Computer Science algorithms which may be used in C projects. The C Programming Language has a much smaller Standard Library as compared to other more modern programming languages such as Java or Python. The library provides a basic set of mathematical functions, string manipulation, type conversions, and file and console-based I/O.

Read More

Ternary Operator with examples in C

In C Programming, ternary operator allows executing different code depending on the value of a condition. The returned value is the result of the expression when the code is executed. The main advantage of using ternary operator is to reduce the number of lines of code and improve the performance of application. In C, the real utility of ternary operator is that it is an expression instead of a statement i.e. you can have it on the right-hand side (RHS) of a statement. So you can write certain code statements more concisely.

Read More

Ternary Operator with examples in C++

In C++, ternary operator allows executing different code depending on the value of a condition, and the result of the expression is the result of the executed code. The ternary operator uses 3 operands. It evaluates a condition and after that chooses one of its two branches to execute, depending upon the result of condition. The symbol for ternary operator is “? :”. The syntax for the ternary operator is: ? : ;

Read More