Server Side Programming Articles

Page 911 of 2109

Explain the deletion of element in linked list

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 907 Views

Linked lists use dynamic memory allocation which allows them to grow and shrink during runtime. A linked list is a collection of nodes where each node contains two parts: data (stores the value) and link (points to the next node). Data Link Data Link Data Link NULL ...

Read More

C program to calculate the standard deviation

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 6K+ Views

Standard deviation is used to measure deviation of data from its mean. The mathematical formula to calculate the standard deviation is as follows − $$s=\sqrt{Variance}$$ where Variance$$=\frac{1}{n}\:\:\displaystyle\sum\limits_{i=1}^n (x_{i}-m)^{2}$$ and $$m=mean=\frac{1}{n}\:\displaystyle\sum\limits_{i=1}^n x_{i}$$ Syntax #include double sqrt(double x); Algorithm Refer an algorithm given below to calculate the standard deviation for the given numbers − Step 1 − Read n items. Step 2 − Calculate sum and mean of the items. Step 3 − Calculate variance. Step 4 − Calculate standard deviation. The logic used in the ...

Read More

C Program to represent a multiplication table.

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 968 Views

In C programming, a multiplication table displays the products of numbers in a systematic grid format. This program creates a 12x10 multiplication table where each row represents multiples of a number from 1 to 12. Syntax for(int i = 1; i

Read More

C program to calculate range of values and an average cost of a personal system.

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 823 Views

A personal system is sold at different costs by vendors. To analyze the pricing data, we need to calculate statistical measures like the average cost and range of values. Let's take the list of costs (in hundreds) quoted by some vendors − 25.00, 30.50, 15.00, 28.25, 58.15, 37.00, 16.65, 42.00, 68.45, 53.50 Syntax Range = Highest Value - Lowest Value Average = Sum of All Values / Total Count Solution The range is the difference between the highest and lowest values in a dataset. The average is the sum of all values divided ...

Read More

C Program to calculate the salesmen salary with macro functions.

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 2K+ Views

In C programming, macro functions provide a way to define constants and simple calculations that are processed during compilation. This program demonstrates how to calculate a salesman's salary using predefined macro constants for base salary, bonus rates, and commission percentages. Problem Statement A laptop manufacturing company has the following monthly compensation policy for their salespersons − Minimum base salary: 3000.00 Bonus for every laptop sold: 200.00 Commission on total monthly sales: 5 percent Since laptop prices change monthly, the sales price of each laptop is fixed at the beginning of every month. Syntax ...

Read More

C program to find out cosine and sine values using math.h library.

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 6K+ Views

In C programming, the math.h library provides trigonometric functions like cos() and sin() to calculate cosine and sine values. These functions take angles in radians as input and return the corresponding trigonometric values. Syntax #include double cos(double x); // Returns cosine of x (in radians) double sin(double x); // Returns sine of x (in radians) Parameters x − The angle in radians for which to calculate the trigonometric value Return Value Both functions return a double value representing the cosine or sine of the ...

Read More

How to multiply two matrices using pointers in C?

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 14K+ Views

Matrix multiplication is a fundamental operation in linear algebra. In C programming, we can multiply two matrices using pointers to access matrix elements efficiently. This approach demonstrates how pointer arithmetic works with 2D arrays. Syntax // Matrix multiplication using pointers *(*(result + i) + j) = sum of (*(*(mat1 + i) + k)) * (*(*(mat2 + k) + j)) Understanding Pointer Access in 2D Arrays When working with 2D arrays and pointers − mat[i][j] is equivalent to *(*(mat + i) + j) mat + i points to the i-th row *(mat + ...

Read More

Write a C program to print all files and folders.

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 2K+ Views

In C programming, we can list all files and folders in a directory using directory handling functions. This requires the dirent.h header which provides structures and functions to work with directory entries. Syntax DIR *opendir(const char *dirname); struct dirent *readdir(DIR *dirp); int closedir(DIR *dirp); Key Functions opendir() − Opens a directory stream for reading readdir() − Reads directory entries one by one closedir() − Closes the directory stream Note: This program uses dirent.h which is POSIX standard. On Windows with certain compilers, you might need additional setup or use platform-specific ...

Read More

Explain the quick sort technique in C language.

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 95K+ Views

Quick sort is a highly efficient divide-and-conquer sorting algorithm that works by selecting a 'pivot' element and partitioning the array around it. Elements smaller than the pivot go to the left, and larger elements go to the right, then the process is repeated recursively on both subarrays. How Quick Sort Works The quick sort algorithm follows these steps − Step 1: Choose a pivot element from the array (typically the first, last, or middle element) Step 2: Partition the array so elements less than pivot are on the ...

Read More

C program to print the ASCII values in a string.

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 9K+ Views

In C programming, we can print the ASCII values of characters in a string by iterating through each character and using the %d format specifier to display its numeric ASCII value. Syntax while(str[i] != '\0') { printf("ASCII Value of %c = %d", str[i], str[i]); i++; } String Declaration and Initialization A string in C is an array of characters terminated by a null character '\0'. Declaration: char stringname[size]; Initialization methods: Using character constants: char string[10] = ...

Read More
Showing 9101–9110 of 21,090 articles
« Prev 1 909 910 911 912 913 2109 Next »
Advertisements