
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

467 Views
Given with the n P r, where P represents Permutation, n represents total numbers and r represents arrangement the task is to calculate the value of nPr.Permutation is the arrangement of data in a sequence or order. Permutation and combination differs in the sense that permutation is the process of arranging whereas combination is the process of selection of elements from the given set.Formula for permutation is −nPr = (n!)/(n-r)!ExampleInput-: n=5 r=2 Output-: 20AlgorithmStart Step 1 -> declare function to calculate value of nPr int cal_n(int n) IF n Declare function to calculate the final ... Read More

165 Views
What is Decagon?Given with side, the task is to calculate the perimeter of decagon. Decagon is a type of polygon with 10-sides that’s why it is also known as 10-gon polygon. It have 10 vertices and edges. A regular decagon has sides of equal length and each internal angle of degree 144.Given below is the figure of DecagonTo calculate the volume and surface area of Frustum of cone there is a formulaPerimeter = 10 * SideExampleInput-: side=10 Output-: perimeter of Decagon is : 100 Input -: side = 20 Output -: perimeter of Decagon is : 200AlgorithmStart Step 1 ... Read More

218 Views
What is Equilateral Triangle?As the name suggests, equilateral triangle is the one that have equal sides and also it have equal interior angles of 60° each. It is also known as regular triangle because it’s a regular polygonProperties of equilateral triangle are −3 sides of equal lengthInterior angles of same degree which is 60IncircleIncircle is the circle that lies inside the triangle which means the center of circle is same as of triangle as shown in the figure below. The center of incircle is known as incenter and radius is known as inradius.Given below is the figure of Incircle of ... Read More

327 Views
What is rhombus?In geometry, rhombus is a quadrilateral with four sides of same length. Rhombus resembles with the shape diamond. If the diagonals of rhombus meet at right angle than it becomes square.Properties of rhombus are −equal sidesOpposite sides are parallel and opposite angles are equal making it parallelogramdiagonals bisects at right angleGiven below is the figure of rhombusProblemGiven with the diagonals, let’s say, d1 and d2 the task is to find the area and perimeter of a rhombus where area is the space occupied by the shape and perimeter is the space that its boundaries will coverTo calculate area ... Read More

779 Views
Given with the number n the task is to calculate the factorial of a number. Factorial of a number is calculated by multiplying the number with its smallest or equal integer values.Factorial is calculated as −0! = 1 1! = 1 2! = 2X1 = 2 3! = 3X2X1 = 6 4! = 4X3X2X1= 24 5! = 5X4X3X2X1 = 120 . . . N! = n * (n-1) * (n-2) * . . . . . . . . . .*1ExampleInput 1 -: n=5 Output : 120 Input 2 -: n=6 Output : 720There are multiple methods that ... Read More

838 Views
Given with certain values the program will develop an EMI calculator to generate the needed output. EMI stands for Equated Monthly Installment. So this calculator will generate monthly EMI amount for the user.ExampleInput-: principal = 2000 rate = 5 time = 4 Output-: Monthly EMI is= 46.058037The formula used in the below program is −EMI : (P*R*(1+R)T)/(((1+R)T)-1)where, P indicates loan amount or the Principal amount.R indicates interest rate per monthT indicates loan time period in yearApproach used below is as followsInput principal, rate of interest and time in float variableApply the formula to calculate the EMI amountPrint the ... Read More

2K+ Views
Given with n nodes the task is to print the nth node from the end of a linked list. The program must not change the order of nodes in a list instead it should only print the nth node from the last of a linked list.ExampleInput -: 10 20 30 40 50 60 N=3 Output -: 40In the above example, starting from first node the nodes till count-n nodes are traversed i.e 10, 20 30, 40, 50, 60 and so the third node from the last is 40.Instead of traversing the entire list this efficient approach can be followed ... Read More

389 Views
Given with n nodes the task is to print the product of all the nodes of a singly linked list. The program must traverse all the nodes of a singly linked list starting from the initial node till the NULL is not found.ExampleInput -: 1 2 3 4 5 Output -: 120In the above example, starting from first node all the nodes are traversed i.e 1, 2 3, 4, 5, 6 and their product is 1*2*3*4*5*6 = 120Approach used below is as followsTake a temporary pointer, lets say, temp of type nodeSet this temp pointer to first node which is ... Read More

200 Views
Given with n nodes the task is to print the product of alternate node in a linked list. The program must only print the product of alternate nodes without actually changing the locations of the nodes.ExampleInput -: 10 20 30 40 50 60 Output -: 15000In the above example, starting from first node which is 10 alternate nodes are 10, 30, 50 and their product is 10*30*50 = 15000.In the above diagram, blue coloured nodes are the alternate nodes, if we start from first node and red coloured nodes are non considerable nodes.Approach used below is as followsTake a temporary ... Read More

994 Views
C programming language can be used to find the details of the Internet connection of the system. Now, let’s learn about the basics terms that we need in this problem.IP Address − IP Address stands for Internet Protocol address. An IP address is a fixed numerical identification number that is associated with each device. IP address allows communication of your device using IP address over the internet.Subnet Mask − A 32-bit component of the IP address. The subnet mask differentiates the network component of IP address into two parts of the IP address. One being network address and other being ... Read More