
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1339 Articles for C

1K+ Views
The area of circumcircle of a right-angle triangle when the hypotenuse(H) of the triangle is given is found using the formula πH2/4.This formula is derived using the fact that the circumcircle touches all the corners of the triangle, in this case the maximum length between two points in the hypotheses which passes through the center of the circle. This makes the hypotenuse the diameter of the circle.This is why the area of circle which is πd2/4. (d = 2r) replaces the d by H.ExampleHypotenuse = 8Area of circle = 50.26Example Code Live Demo#include int main(void) { int H = ... Read More

10K+ Views
The area of a circle inscribed inside an equilateral triangle is found using the mathematical formula πa2/12.Lets see how this formula is derived, Formula to find the radius of the inscribed circle = area of the triangle / semi-perimeter of triangle.Area of triangle of side a = (√3)a2/4Semi-perimeter of triangle of side a = 3a/2According to formula, Radius of circle = (√3)a22/4 / 3a/2 = a/2√3Area of circle = πr2 = πa2/12Example Code Live Demo#include int main(void) { int a = 5; float pie = 3.14; float area = (float)((pie*a*a)/12); printf("the area of circle inscribed in ... Read More

3K+ Views
Circle inscribed in a rhombus touches its four side a four ends. The side of rhombus is a tangent to the circle.Here, r is the radius that is to be found using a and, the diagonals whose values are given.Now the area of triangle AOB = ½ * OA * OB = ½ * AB * r (both using formula ½*b*h).½ *a/2*b/2 = ½ *( √ (a2/4 + b2/4))*ra*b/8 = √ (a2+ b2 )*r /4r = a*b/ 2√ (a2+ b2 )Area of circle = π*r*r = π*(a2*b2)/4(a2+ b2 )ExampleThe diagonal of the rhombus 5 & 10.Area is 15.700000Example Code Live Demo#include ... Read More

1K+ Views
A circular sector also known as circle sector / sector of a circle is the portion of the circle that is inscribed by between 2 radii. This area is enclosed between two radii and an arc. To find the area inscribed we need to find the angle that is between the two radii. The total area is equal to 360o of angle. To find the area for an angle we will multiply the area by θ/360. This given the area of section inscrible.Where θ is the angle between the two radii in degree.Area of a sector of a circle = ... Read More

3K+ Views
The circle inscribed in a regular hexagon has 6 points touching the six sides of the regular hexagon.To find the area of inscribed circle we need to find the radius first. For the regular hexagon the radius is found using the formula, a(√3)/2.Now area of the circle inscribed is 3πa*a/4SampleSide of hexagon − 4Area = 37.68Example Code Live Demo#include int main(void) { int a = 14; float pie = 3.14; float area = (float)(3*a*a*pie/4); printf("The area of circle inscribed in the hexagon of side %d is %f", a, area); return 0; }OutputThe area of circle ... Read More

111 Views
A decagonal number is a figurate that was derived using the concept of triangular numbers and square numbers. This extension of number pattern is created using non-rotationally symmetrical numbers. This nested decagon oriented number is given by the number of dots in the number of nested decagons that are created. For example, for 3rd decagonal number 3 decagonal figures are nest each with iX time the number of sides in the decagon. As shown in figure −Side in 1st Outer figure = 30 Side in 2nd Outer figure = 20 Side in inner figure = 10 Sides common in all = 6+2 Total = 30+20+10-(6+2) ... Read More

3K+ Views
To find the average of even numbers till a given even number, we will add all the even number till the given number and t count the number of even numbers. Then divide the sum by the number of even numbers.ExampleAverage of even numbers till 10 is 6 i.e.2 + 4 + 6 + 8 + 10 = 30 => 30/ 5 = 6There are two methods for calculating the average of even number till n which is an even number.Using LoopsUsing FormulaProgram to find the average of even number till n using loopsTo calculate the average of even numbers ... Read More

3K+ Views
The average of odd numbers till a given odd number is a simple concept. You just need to find odd numbers till that number then take their sum and divide by the number.If average of odd number till n is to be found. Then we will find odd numbers from 1 to n add then divide it by the number of odd number.ExampleAverage of odd number till 9 is 5 i.e.1 + 3 + 5 + 7 + 9 = 25 => 25/5 = 5There are two methods for calculating the average of odd number till n which is an ... Read More

3K+ Views
The average of the square of Natural Number is calculated by adding all the squares up to n natural numbers and then dividing it by the number.SampleAverage of square of first 2 natural numbers is 2.5 ,12 + 22 = 5 => 5/2 = 2.5.There are two methods for calculating this is programming −Using LoopsUsing FormulaCalculating average of square of natural numbers using loopsThis logic works by finding the squares of all natural numbers. By loop from 1 to n finding square of each and adding to the sum variable. Then dividing this sum by n.Program to find the sum ... Read More

1K+ Views
Power function is used to calculate the power of the given number.The pow function find the value of a raised to the power b i.e. ab.Syntaxdouble pow(double a , double b)It accepts a double integers as input and output a double integer as output. It pow() function is defined in math.h package.If you pass an integer to the power function, the function converts it into double data type. But there's an issue with this, sometimes this conversion might store this as a lower double. For example, if we pass 3 and is converted as 2.99 then the square is 8.99940001 ... Read More