Sudhir sharma has Published 1206 Articles

Area of a leaf inside a square in C Program?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 07:07:47

176 Views

To find the area of leaf inside a square, we need to split it into parts and find the area of parts and then add the areas to find the area of leaf.To calculate the area we are splitting the leaf into two parts.To find the area of 1st part ... Read More

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

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 06:57:01

144 Views

Given, A square that is inscribed within a circle that is inscribed in a regular hexagon and we need to find the area of the square, for that we need to find the relation of the side of square and the side of the hexagon.The mathematical formula for the radius ... Read More

Area of a triangle inscribed in a rectangle which is inscribed in an ellipse?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 06:52:46

184 Views

For understanding this complex problem, let's do it in two parts. First we will find the dimensions of the rectangle and based on that we can find the area of a triangle inscribed in it.Using the equation of ellipse and differential calculus, mathematical formula for the area of a rectangle ... Read More

Area of decagon inscribed within the circle in C Program?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 06:43:58

217 Views

A regular decagon is a ten sided polygon with all sides and angles equal. And here we need to find the area of a decagon that is inscribed inside a circle using the radius of the circle r, Mathematical formula for the side of the decagon inscribed in the circle, ... Read More

Area of hexagon with given diagonal length in C Program?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 06:40:03

841 Views

A Hexagon is a closed figure of 6 side and a regular hexagon is the one which has all six sides equal and angle equal. For finding the area of hexagon, we are given only the length of its diagonal i.e d.The interior angles of Hexagon are of 120 degrees ... Read More

Area of largest Circle inscribed in N-sided Regular polygon in C Program?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 06:34:34

123 Views

An n-sided regular polygon inscribed in a circle, the radius of this circle is given by the formula, r = a/(2*tan(180/n))Suppose a polygon have 6 faces i.e., a hexagon and as we know mathematically that the angle is 30 degreeSo the radius of circle will be (a / (2*tan(30)))Therefore, r ... Read More

Area of Incircle of a Right Angled Triangle in C Program?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 06:28:56

1K+ Views

To find the area of a circle inside a right angled triangle, we have the formula to find the radius of the right angled triangle, r = ( P + B – H ) / 2.Given the P, B and H are the perpendicular, base and hypotenuse respectively of a ... Read More

C++ Program string class and its applications?

sudhir sharma

sudhir sharma

Updated on 08-Aug-2019 08:18:41

130 Views

String is a sequence of characters. In C++ programming language, The strings can be defined in two ways −C style strings: treats the string as a character array.String Class in C++The string class can be used in a C++ program from the library ‘string’. It stores the string as a ... Read More

C vs BASH Fork bomb?

sudhir sharma

sudhir sharma

Updated on 08-Aug-2019 08:09:29

205 Views

Fork() bomb is a Dos (Denial Of Service) attack against the linux based system. This calls the Fork() system infinite number of times that fills the memory of the program and intends to harm the system.Bash script for fork bomb:(){ :|: & };:The code explained as :( ) is function ... Read More

C/C++ Programming to Count trailing zeroes in factorial of a number?

sudhir sharma

sudhir sharma

Updated on 08-Aug-2019 08:06:48

746 Views

Counting the number of trailing zeroes in a factorial number is done by counting the number of 2s and 5s in the factors of the number. Because 2*5 gives 10 which is a trailing 0 in the factorial of a number.ExampleFactorial of 7 = 5040, the number of trailing 0’s ... Read More

Advertisements