Server Side Programming Articles

Page 948 of 2109

Program to Calculate the Perimeter of a Decagon in C program

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 224 Views

A decagon is a polygon with 10 sides and 10 vertices. In a regular decagon, all sides are equal in length and each internal angle measures 144 degrees. The perimeter of any polygon is the sum of all its side lengths. V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 ...

Read More

Program to calculate the Area and Perimeter of Incircle of an Equilateral TrianglenWhat is Equilateral Triangle in C?

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 278 Views

In C programming, calculating the area and perimeter of an incircle (inscribed circle) of an equilateral triangle involves using specific mathematical formulas. The incircle is the largest circle that can fit inside the triangle, touching all three sides. What is an Equilateral Triangle? An equilateral triangle has three equal sides and three equal interior angles of 60° each. It is also known as a regular triangle because it's a regular polygon. Properties of equilateral triangle are − 3 sides of equal length Interior angles of same degree which is 60° Incircle An ...

Read More

Program for EMI Calculator in C program

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 977 Views

EMI (Equated Monthly Installment) is a fixed payment amount made by a borrower to a lender at a specified date each month. An EMI calculator helps determine the monthly payment amount based on the loan principal, interest rate, and tenure. Syntax EMI = (P * R * (1 + R)^T) / (((1 + R)^T) - 1) Where: P − Principal loan amount R − Monthly interest rate (annual rate / 12 / 100) T − Total number of months (years * 12) Example: EMI Calculator Implementation The following program calculates the ...

Read More

Program for n'th node from the end of a Linked List in C program

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 2K+ Views

In this tutorial, we will learn how to find the nth node from the end of a linked list in C. The program should print the nth node from the last without changing the order of nodes in the linked list. Syntax void findNthFromEnd(struct node* head, int n); Example Input/Output Input − 10 20 30 40 50 60 N = 3 Output − 40 In the above example, the third node from the end is 40. We can visualize this as − ...

Read More

Product of the alternate nodes of linked list

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 264 Views

Given a linked list with n nodes, the task is to find the product of alternate nodes. The program calculates the product of nodes at positions 1, 3, 5, etc. (starting from position 1) without modifying the linked list structure. Syntax void calculateAlternateProduct(); struct node { int data; struct node *next; }; Example Input: 10 20 30 40 50 60 Output: 15000 In the above example, starting from the first node (10), alternate nodes are 10, 30, 50 and their product is 10 ...

Read More

C Program to find IP Address, Subnet Mask & Default Gateway

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

C programming language can be used to find the details of the Internet connection of the system. Now, let's learn about the basic 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. One being network address and other being ...

Read More

C Program to find direction of growth of stack

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

A stack is a data structure that stores elements in memory. The stack can grow in two directions: upward (toward higher memory addresses) or downward (toward lower memory addresses). This direction depends on the system architecture and compiler implementation. When functions are called, local variables are allocated on the stack. By comparing the memory addresses of local variables in different function calls, we can determine the stack's growth direction. Syntax void function_name(int *address_pointer); // Compare addresses using pointer arithmetic if (address1 < address2) { /* stack direction logic */ } Algorithm Step ...

Read More

C program to compare two files and report mismatches

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

In C programming, we can access files and read their content to perform various operations. Comparing two files character by character helps identify differences between similar documents. This program compares two text files and reports any mismatches found, including the line number and position where the first difference occurs. Syntax FILE *fopen(const char *filename, const char *mode); int getc(FILE *stream); int fclose(FILE *stream); Algorithm Step 1: Open both files with read mode Step 2: Read characters one by one from both files simultaneously Step 3: Compare characters and track line numbers and ...

Read More

C program that does not suspend when Ctrl+Z is pressed

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

In C programming, when a program malfunctions or runs indefinitely, programmers can explicitly stop execution using keyboard shortcuts. Understanding how to handle or override these signals is crucial for creating robust applications. There are two primary keyboard shortcuts used to control program execution − Ctrl+C − Sends a SIGINT signal to terminate the program immediately. This signal can be handled using the signal() function in C. Ctrl+Z − Sends a SIGTSTP signal to suspend the program execution. This signal is more powerful and can also be intercepted and handled. Here, we will create a C ...

Read More

C Program for Reversal algorithm for array rotation

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

An algorithm is a set of instructions that are performed in order to solve the given problem. Here, we will discuss the reversal algorithm for array rotation and create a program for a reversal algorithm. Now, let's get to some terms that we need to know to solve this problem − Array − A container of elements of the same data type. The size (number of elements) of the array is fixed at the time of the declaration of the array. Array rotation − Rotating an array is changing the order of the elements of the array. ...

Read More
Showing 9471–9480 of 21,090 articles
« Prev 1 946 947 948 949 950 2109 Next »
Advertisements