How to remove Character from String in C using Pointer

Our mission is to learn how to remove character from string in C using Pointer. Let me think how, so we need to write a function that receives a character string (word) and a character as arguments and deletes all occurrences of this character in the string. The function should return the corrected string with no holes.

Example

String entered: database

Character entered: a

Result: dtbse

Read more

Bisection Method – Algorithm, Flowchart and Code in C

If you are trying to understand Bisection Method: its algorithm, flowchart and code in C. You are at right place we’ll be discussing how bisection method works and implement it in a C Program.  First of all, let’s understand what is Bisection Method. The bisection method is one of the simplest and most reliable of iterative methods for the solution of nonlinear equations. This method, also known as binary chopping or half-interval method, relies on the fact that if f(x) is real and continuous in the interval a < x < b, and f(a) and f(b) are of opposite signs, that is,

f(a)*f(b) < 0

then there is at least one real root in the interval between a and b.

Bisection Method – Algorithm, Flowchart and Code in C
Bisection Method Illustration

Read more

Top 30 Best IDEs and Compilers for C/C++

Top 30 Best IDEs and Compilers for C/C++

If you’re interested in learning to program in C/C++ you’ll find this list of C/C++ Compilers handy. Here I have list of Top 30 Best IDEs and Compilers for C / C++. Most of these compilers do C++ and C. Just rename the files to have .c for C Programs and .cpp for C++ programs extensions. Below is the list of some best and free C/C++ compilers and IDEs for Computer Programmers.

Read more

C Program implementing Lagrange Interpolation Formula

In numerical analysis, Lagrange polynomials are used for polynomial interpolation. For a given set of distinct points Xi and numbers Yi, the Lagrange polynomial is the polynomial of the least degree that at each point Xj assumes the corresponding value Yj (i.e. the functions coincide at each point). The interpolating polynomial of the least degree is unique, however, and it is therefore more appropriate to speak of “the Lagrange form” of that unique polynomial rather than “the Lagrange interpolation polynomial”, since the same polynomial can be arrived at through multiple methods.

The Lagrange interpolating polynomial is the polynomial P(X) of degree <=(n – 1) that passes through the n points (x1, y1 = f(x1)),(x2, y2 = f(x2)) ,.., (xn, yn = f(xn)), , and is given by

Read more