## C Program to Implement Linear Search using Recursion

This is a C Program to implement Linear Search Algorithm using Recursion. Problem Description We have to create a C Program which finds the position of an element in an array using Linear Search Algorithm using Recursion. Expected Input and Output 1. Average Case : On an average, linear search takes O(n) comparisons to find … Read more

## C Program to Implement the Schonhage-Strassen Algorithm for Multiplication of Two Numbers

This is a C Program to multiply two given numbers using Schonhage-Strassen Algorithm. Suppose we are multiplying two numbers like 123 and 456 using long multiplication with base B digits, but without performing any carrying. The result might look something like this: 0 1 2 3 × 4 5 6 ——————— 00 00 06 12 … Read more

## C Program to Implement Coppersmith Freivald’s Algorithm

This is a C Program to implement Freivald’s algorithm to check if the 3rd matrix is the result of multiplication of the given two matrices. Here is source code of the C Program to Implement Coppersmith Freivald’s Algorithm. The C program is successfully compiled and run on a Linux system. The program output is also … Read more

## C Program to Show the Duality Transformation of Line and Point

This is a C Program to show the duality transformation of line and point. The transformation corresponds from line to point and point to line. Here is source code of the C Program to Show the Duality Transformation of Line and Point. The C program is successfully compiled and run on a Linux system. The … Read more

## C Program to Compute Cross Product of Two Vectors

This is a C Program to find the cross product of two vectors. The cross product or vector product is a binary operation on two vectors in three-dimensional space. It results in a vector that is perpendicular to both and therefore normal to the plane containing them. Here is source code of the C Program … Read more

## C Program to Apply Above-Below-on Test to Find the Position of a Point with respect to a Line

This is a C Program to check whether point lies above, below or on the line. For any point t (xt, yt) on the plane, its position with respect to the line L connecting p and q is found by calculating the scalar s: s = A xt + B yt + C If s … Read more

## C Program to Compute the Volume of a Tetrahedron Using Determinants

This is a C Program to find the volume of tetrahedron. Call the four vertices of the tetrahedron (a, b, c), (d, e, f), (g, h, i), and (p, q, r). Now create a 4-by-4 matrix in which the coordinate triples form the colums of the matrix, with a row of 1’s appended at the … Read more

## C Program to Compute the Area of a Triangle Using Determinants

This is a C program to find the area of triangle using determinants. Formula for the area of a triangle using determinants x1 y1 1 Area=±1/2 x2 y2 1 x3 y3 1 The plus/minus in this case is meant to take whichever sign is needed so the answer is positive (non-negative). Do not say the … Read more

## C Program to Use Above Below Primitive to Test Whether Two Lines Intersect

This is a C Program to check whether two lines intersect to each other. The above-below primitive can be used to test whether a line intersects a line segment. It does iff one endpoint of the segment is to the left of the line and the other is to the right. Segment intersection is similar … Read more