Articles on Trending Technologies

Technical articles with clear explanations and examples

Align the grid inside the container using CSS

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 176 Views

CSS Grid provides powerful alignment properties to position the entire grid inside its container. The justify-content property aligns the grid horizontally, while align-content aligns it vertically within the container. Syntax .grid-container { justify-content: value; /* Horizontal alignment */ align-content: value; /* Vertical alignment */ } Possible Values ValueDescription startAligns grid to the start of the container centerCenters the grid in the container endAligns grid to the end of the container space-betweenDistributes space between grid tracks space-aroundDistributes space around grid tracks space-evenlyDistributes ...

Read More

Program to Add Two Complex Numbers in C

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

Given are two complex numbers in the form of a1 + ib1 and a2 + ib2, the task is to add these two complex numbers in C programming. Complex numbers are those numbers which can be expressed in the form of "a + ib" where "a" and "b" are real numbers and "i" is the imaginary unit which satisfies i² = −1. Since no real number satisfies this equation, it is called the imaginary unit. Syntax struct complex { int real; int imaginary; }; struct complex addComplex(struct ...

Read More

Create a responsive pagination with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 590 Views

Responsive pagination is a navigation component that adapts to different screen sizes while maintaining usability. This technique uses CSS to create pagination links that automatically adjust their layout and appearance across devices. Syntax .pagination { display: flex; justify-content: center; flex-wrap: wrap; } .pagination a { padding: value; margin: value; text-decoration: none; border: value; } @media (max-width: breakpoint) { /* Responsive styles */ } ...

Read More

Product of middle row and column in an odd square matrix in C

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

Given a square matrix, mat[row][column] where row and column are equal and are of odd length, the task is to find the product of middle row and middle column of that matrix. The matrix must have odd dimensions so there's always a clear middle row and column. 1 2 3 4 5 ...

Read More

Fade in on Button hover with CSS

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 885 Views

CSS fade-in effects on button hover create smooth visual transitions that enhance user interaction. This effect gradually increases a button's opacity from a lower value to full opacity when the user hovers over it. Syntax selector { opacity: initial-value; transition: duration; } selector:hover { opacity: final-value; } Example: Basic Fade-in on Hover The following example creates a button that fades in from 50% to full opacity on hover − ...

Read More

Set the width of a button with CSS

Rishi Rathor
Rishi Rathor
Updated on 15-Mar-2026 5K+ Views

The CSS width property is used to set the width of a button. By default, buttons size themselves based on their content, but you can control their width using CSS to create consistent button layouts. Syntax button { width: value; } Possible Values ValueDescription autoDefault value - button width adjusts to content lengthSets width using px, em, rem, etc. %Sets width as percentage of parent container max-contentWidth based on content size Example: Fixed Width Button The following example sets a button width to 150px with styling ...

Read More

Program to compare two fractions in C

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

In C programming, comparing two fractions requires cross-multiplication to avoid floating-point precision issues. Given two fractions with numerators and denominators, we need to determine which fraction has the greater value. Syntax struct Fraction { int nume, deno; }; struct Fraction greater(struct Fraction first, struct Fraction second); Approach To compare fractions a/b and c/d, we use cross-multiplication: if a*d > b*c, then a/b > c/d. This avoids floating-point division and maintains precision. Example 1: Basic Fraction Comparison This example compares 4/5 and 3/4 using cross-multiplication − ...

Read More

Add a pressed effect on button click with CSS

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 3K+ Views

Adding a pressed effect on button click with CSS makes the user feel more interactive with the web page. It provides an immediate visual effect indicating that the button press has been registered, helping to improve the user experience. In this article, we have a button on our web page. Our task is to add a pressing effect while clicking the button using different CSS techniques. Syntax button:active { transform: transformFunction(value); } Approaches to Add a Pressed Effect on Button Here are three approaches to add a pressed effect ...

Read More

Annuitant

Praveen Varghese Thomas
Praveen Varghese Thomas
Updated on 15-Mar-2026 470 Views

An annuitant is the individual who receives regular payments from an annuity contract. While the annuity owner purchases the contract and controls its terms, the annuitant is the specific person whose life expectancy and characteristics determine payment amounts and duration. The annuitant may be the same person as the owner, or they can be different individuals, such as a spouse or family member. Key Concepts To understand annuitants, it's essential to distinguish between three key roles in annuity contracts: Annuity Owner − The person who purchases the contract and has control over it Annuitant − The ...

Read More

Program to check if an array is sorted or not (Iterative and Recursive) in C

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

Given an array arr[] with n number of elements, our task is to check whether the given array is in sorted order or not. If it is in sorted order then print "The array is in sorted order", else print "The array is not in sorted order". To solve this problem we can use iterative or recursive approach, we will be discussing both. Syntax int isSorted(int arr[], int n); Method 1: Iterative Approach In iterative approach, we use loops to traverse the array and compare adjacent elements ? #include ...

Read More
Showing 20961–20970 of 61,297 articles
Advertisements