C Articles

Page 56 of 96

C Program for area of decagon inscribed within the circle?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 264 Views

Here we will see how to get the area of a decagon inscribed within a circle. A decagon is a 10-sided polygon, and when inscribed in a circle, all vertices of the decagon lie on the circumference of the circle. Given the radius of the circle, we can calculate the area of the inscribed decagon. .circle { fill: none; stroke: #333; stroke-width: 2; } .decagon { fill: rgba(100, 150, 255, 0.3); stroke: #0066cc; stroke-width: 2; } ...

Read More

Area of circle inscribed within rhombus in C Program?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 240 Views

In C, we can calculate the area of a circle inscribed within a rhombus using the diagonals of the rhombus. When a circle is inscribed in a rhombus with diagonals 'a' and 'b', the circle touches all four sides of the rhombus. ...

Read More

Area of a square inscribed in a circle which is inscribed in a hexagon in C Program?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 182 Views

Here we will see how to find the area of a square inscribed in a circle, which is itself inscribed in a hexagon. Let's say the side of the hexagon is 'A', the radius of the inscribed circle is 'r', and the side of the square is 'a'. A r a Mathematical Relationship For a regular hexagon with side A, the radius of the inscribed ...

Read More

Angle between two Planes in 3D in C Program?

Aman Kumar
Aman Kumar
Updated on 15-Mar-2026 281 Views

In 3D geometry, planes are flat surfaces extending infinitely in space. When two planes intersect, they form a line, and the angle between them becomes an important geometric measure. The angle between two planes is calculated using their normal vectors and the dot product formula. Syntax angle = acos(dot_product / (magnitude1 * magnitude2)) * (180 / PI) Plane Equations Two planes in 3D space can be represented by the following general equations − P1: a1 * x + b1 * y + c1 * z + d1 = 0 P2: ...

Read More

Alphanumeric Abbreviations of a String in C Program?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 633 Views

In C programming, generating alphanumeric abbreviations of a string means creating all possible combinations where some characters can be replaced with numbers representing the count of omitted characters. For example, "HELLO" can be abbreviated as "HE2O" where "2" represents the two omitted characters "LL". Syntax void printAbbreviation(const char* s, int index, int max_index, char* str, int str_len); Algorithm The recursive algorithm works as follows − printAbbreviation(s, index, max, str) − begin if index is same as max, then print str ...

Read More

C Program to Find the minimum sum of factors of a number?

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 489 Views

The minimum sum of factors of a number is the sum of all prime factors (with repetition) of that number. This approach decomposes the number into its smallest possible factors, which are prime numbers, resulting in the minimum possible sum. Syntax int findMinSumOfFactors(int n); Explanation To find the minimum sum of factors, we need to find all possible ways to factorize the number and compare their sums. The minimum sum is always achieved by using prime factorization − Input: n=12 Output: 7 Following are different ways to factorize 12 and ...

Read More

C Program to Compute Quotient and Remainder?

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 495 Views

Given two numbers dividend and divisor, we need to write a C program to find the quotient and remainder when the dividend is divided by the divisor. In division, we see the relationship between the dividend, divisor, quotient, and remainder. The number which we divide is called the dividend. The number by which we divide is called the divisor. The result obtained is called the quotient. The number left over is called the remainder. 55 ÷ 9 = 6 and 1 Dividend Divisor Quotient Remainder Syntax quotient = dividend / divisor; remainder = ...

Read More

C Program To Check whether Matrix is Skew Symmetric or not?

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 4K+ Views

A square matrix A is said to be skew-symmetric if Aij = −Aji for all i and j. In other words, a matrix A is skew-symmetric if the transpose of matrix A equals the negative of matrix A (AT = −A). Note that all main diagonal elements in a skew-symmetric matrix are zero. Syntax // Check if matrix[i][j] == -matrix[j][i] for all i, j if (A[i][j] == -A[j][i]) { // Matrix is skew-symmetric } Example Matrix Let's take an example of a 3×3 matrix − A = ...

Read More

C Program for Rat in a Maze - Backtracking-2?

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 3K+ Views

Rat in a maze is a popular problem that utilizes backtracking algorithm. In this problem, we have a 2D matrix representing a maze where some cells are blocked and we need to find a path from source to destination. A maze is a 2D matrix in which some cells are blocked. One of the cells is the source cell, from where we have to start, and another is the destination where we have to reach. We must find a path from source to destination without moving into any blocked cells. Input Maze: ...

Read More

C Program to Check if count of divisors is even or odd?

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 535 Views

Given a number “n” as an input, this program finds whether the total number of divisors of n is even or odd. A divisor of a number is any integer that divides the number without leaving a remainder. An even number is an integer that is exactly divisible by 2. Example: 0, 8, -24 An odd number is an integer that is not exactly divisible by 2. Example: 1, 7, -11, 15 Syntax // Count divisors and check if count is even or odd for (int i = 1; i

Read More
Showing 551–560 of 953 articles
« Prev 1 54 55 56 57 58 96 Next »
Advertisements