C Program to Solve any Linear Equation in One Variable

This is a C Program to solve linear equation in one variable. Here is source code of the C Program to Solve any Linear Equation in One Variable. The C program is successfully compiled and run on a Linux system. The program output is also shown below. #include <stdio.h>#include <string.h>float solve_for_y(float a, float b, float … Read more

advertisement

C Program to Implement the Schonhage-Strassen Algorithm for Multiplication

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 Generate Prime Numbers Using Sieve of Sundaram

This is a C Program to generate prime numbers within a given range using Sieve of Sundaram. Here is source code of the C Program to Generate Prime Numbers Between a Given Range Using the Sieve of Sundaram. The C program is successfully compiled and run on a Linux system. The program output is also … Read more

advertisement

C Program to Perform Optimal Parenthesize using Dynamic Programming

This is a C Program to perform optimal paranthesization using DP. This program determines the order in which the chain of matrices should be multiplied. Here is source code of the C Program to Perform Optimal Paranthesization Using Dynamic Programming. The C program is successfully compiled and run on a Linux system. The program output … Read more

advertisement

C Program to Perform the Unique Factorization of a Given Number

This is a C Program to get all the unique partitions of a given integer such that addition of a partition results an integer. Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers. Here is the source code of the C program to partition an integer … Read more

advertisement

C Program to Implement Sieve of Atkin to Generate Prime Numbers

This is a C Program to find the prime numbers. The sieve of Atkin is a algorithm for finding all prime numbers up to including a specified integer. It is an optimized version of the ancient sieve of Eratosthenes which does some preliminary work and then marks off multiples of the square of each prime, … Read more

advertisement

C Program to Generate Random Numbers in a Range

This is a C Program to generate random numbers within given range. This version of code uses rand() and srand() functions. Here is source code of the C Program to Generate Randomized Sequence of Given Range of Numbers. The C program is successfully compiled and run on a Linux system. The program output is also … Read more

advertisement

C Program to Generate Random Numbers using Probability Distribution Function

This is a C Program to generate random numbers using Probability Distribution Function.The probability density function of a continuous random variable is a function which can be integrated to obtain the probability that the random variable takes a value in a given interval. Here is source code of the C Program to Generate Random Numbers … Read more

advertisement

C Program to Optimize Wire Length in Electrical Circuit

This is a C Program to optimize wire length in electix circuit. This problem can be reduced to finding the shortest path between two components. Here is source code of the C Program to Optimize Wire Length in Electrical Circuit. The C program is successfully compiled and run on a Linux system. The program output … 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.