Articles on Trending Technologies

Technical articles with clear explanations and examples

What are the shift operations in C language?

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

Shift operations in C are bitwise operators that move bits of a number left or right. These operations are fundamental for bit manipulation and can be used for efficient multiplication and division by powers of 2. Syntax variable > n // Right shift by n positions ~variable // Bitwise complement (NOT operation) Left Shift Operation The left shift operator () moves bits to the right by specified positions. Each right shift by one position halves the value (for positive numbers). ...

Read More

How to display columns and rows using named CSS grid items

Samual Sam
Samual Sam
Updated on 15-Mar-2026 227 Views

To display columns and rows using named CSS grid items, use the grid-area property in combination with the grid-template-areas property. This approach allows you to create intuitive, readable layouts by assigning names to grid areas. Syntax .container { display: grid; grid-template-areas: "area1 area2 area3" "area4 area5 area6"; } .item { grid-area: area-name; } Example The following example demonstrates how to create a grid layout ...

Read More

Animate bottom CSS property

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 2K+ Views

The CSS bottom property can be animated to create smooth transitions when changing an element's position from the bottom edge of its containing block. This is particularly useful for creating sliding effects and dynamic positioning animations. Syntax selector { animation: animation-name duration timing-function iteration-count; bottom: initial-value; position: absolute | relative | fixed; } @keyframes animation-name { percentage { bottom: target-value; } } Example: Animating Bottom Property ...

Read More

How to count number of vowels and consonants in a string in C Language?

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

In C programming, counting vowels and consonants in a string is a common string manipulation task. We iterate through each character and check if it's a vowel (a, e, i, o, u) or consonant using conditional statements. Syntax // Check if character is vowel if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U') vowels++; else if(isalpha(ch)) ...

Read More

How to specify the size of the gap between rows in CSS Grid

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

Use the grid-row-gap property to set the size of the gap between rows in CSS Grid. This property controls the vertical spacing between grid items, making your layouts more visually appealing and well-structured. Syntax selector { grid-row-gap: value; } Possible Values ValueDescription lengthDefines the gap size in px, em, rem, etc. %Defines the gap as a percentage of the container normalDefault value, typically 0 Example The following example demonstrates a CSS Grid layout with a 50px gap between rows − ...

Read More

C program to print multiplication table by using for Loop

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

A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times. In this tutorial, we will learn how to print a multiplication table using a for loop in C. Syntax for (initialization; condition; increment/decrement) { // statements to be executed } Algorithm Given below is an algorithm to print multiplication table using for loop in C language − Step 1: Enter a number to print table at runtime. Step 2: Read that number from keyboard. Step 3: Using for loop print number*i 10 times. // for(i=1; i

Read More

Set how auto-placed items are inserted in the CSS grid

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

The CSS grid-auto-flow property controls how auto-placed grid items are inserted in the grid container. It determines whether items flow into rows or columns and how they fill available spaces. Syntax selector { grid-auto-flow: value; } Possible Values ValueDescription rowItems are placed by filling each row (default) columnItems are placed by filling each column denseItems fill holes earlier in the grid row denseCombines row flow with dense packing column denseCombines column flow with dense packing Example: Column Flow The following example demonstrates items flowing into columns ...

Read More

How to write a simple calculator program using C language?

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

A calculator is a simple tool that helps us to calculate mathematical operations easily and quickly. A basic calculator can perform simple arithmetic operations like subtraction, addition, multiplication, and division. In C programming, we can create a calculator using switch-case statements to handle different operators and perform calculations based on user input. Syntax switch(operator) { case '+': result = num1 + num2; break; case '-': result = num1 - num2; break; case '*': result = num1 * num2; break; case ...

Read More

Write a C program to find out profit or loss in buying an article

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

In business transactions, calculating profit or loss is essential to determine the financial outcome. Profit occurs when the selling price exceeds the cost price, while loss occurs when the cost price is greater than the selling price. Syntax if (selling_price > cost_price) { profit = selling_price - cost_price; } else if (cost_price > selling_price) { loss = cost_price - selling_price; } else { // No profit, no loss } Formulas The formulas for calculating profit and loss are − Profit: ...

Read More

CSS all Property

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 207 Views

The CSS all property is a shorthand property that resets all CSS properties to their initial, inherited, or unset values. It provides a convenient way to clear all styling from an element and start with a clean slate. Syntax selector { all: value; } Possible Values ValueDescription initialResets all properties to their initial values inheritSets all properties to inherit from parent element unsetResets properties to inherit if inheritable, otherwise to initial revertResets properties to browser default values Example: Using all: inherit The following example demonstrates how ...

Read More
Showing 20821–20830 of 61,297 articles
Advertisements