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

advertisement

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

advertisement

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

advertisement

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

advertisement

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

advertisement

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

advertisement

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

advertisement

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

advertisement

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

advertisement

C Program to Check if a Point d lies Inside or Outside a Circle Defined by Points a, b, c in a Plane

This is a C Program to Check if a Point d lies Inside or Outside a Circle Defined by Points a, b, c in a Plane. For any point t (xt, yt) on the plane, its position with respect to the circle defined by 3 points (x1, y1) , (x2, y2), (x3, y3). s = … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & technical discussions at Telegram SanfoundryClasses.