Articles on Trending Technologies

Technical articles with clear explanations and examples

Role of CSS Grid Container

Anvi Jain
Anvi Jain
Updated on 15-Mar-2026 135 Views

The CSS Grid Container is the parent element that establishes a grid formatting context for its children. When you apply display: grid to an element, it becomes a grid container, and all its direct children automatically become grid items. Syntax .container { display: grid; grid-template-columns: value; grid-template-rows: value; } Key Properties PropertyDescription display: gridCreates a grid container grid-template-columnsDefines the number and size of columns grid-template-rowsDefines the number and size of rows grid-gapSets spacing between grid items Example: Basic Grid ...

Read More

CSS object-fit Property Values

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

The CSS object-fit property is used to specify how an image or video should be resized to fit its container. This property is particularly useful when you need to maintain aspect ratios or control how content fills its allocated space. Syntax selector { object-fit: value; } Possible Values ValueDescription fillContent is stretched to completely fill the container (default value) containContent is scaled to maintain aspect ratio while fitting entirely within container coverContent is scaled to maintain aspect ratio while covering entire container (may be clipped) noneContent retains its original ...

Read More

Flood fill algorithm using C graphics

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 5K+ Views

The flood fill algorithm is a technique used to fill a connected region with a specific color. It starts from a seed pixel and recursively fills all adjacent pixels that have the same color as the original pixel. Syntax void floodFill(int x, int y, int newColor, int oldColor); Note: This example requires Turbo C/C++ or a compatible graphics library with graphics.h support. Modern compilers may need additional setup for graphics functions. Algorithm Steps The flood fill algorithm follows these steps − Check if the current pixel coordinates are within ...

Read More

C program to simulate Nondeterministic Finite Automata (NFA)

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

In this problem, we will create a C program to simulate Non-deterministic Finite Automata (NFA). NFA is a finite state machine that can move to any combination of states for an input symbol, meaning there is no exact state to which the machine will move. Syntax struct node { int data; struct node* next; char edgetype; }; int nfa(node** graph, int current, char* input, int* accept, int start); Formal Definition of NFA NFA can be represented by 5-tuple (Q, Σ, δ, ...

Read More

How an or should be resized to fit its container with CSS?

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 381 Views

The CSS object-fit property is used to resize an image to fit its container while maintaining control over how the image is scaled and positioned. This property is essential for creating responsive layouts where images need to adapt to different container sizes without distorting their appearance. Syntax selector { object-fit: value; } Possible Values ValueDescription fillStretches the image to fill the container (may distort aspect ratio) containScales image to fit inside container while maintaining aspect ratio coverScales image to cover entire container while maintaining aspect ratio scale-downActs as either ...

Read More

Flip an image on mouse over with CSS

Jennifer Nicholas
Jennifer Nicholas
Updated on 15-Mar-2026 473 Views

The CSS transform property can be used to flip an image horizontally when a user hovers over it. This creates an engaging interactive effect by using the scaleX(-1) value to mirror the image along its X-axis. Syntax selector:hover { transform: scaleX(-1); } Example: Horizontal Image Flip on Hover The following example demonstrates how to flip an image horizontally when the mouse hovers over it − .flip-image { width: 300px; ...

Read More

C Program to reverse each node value in Singly Linked List

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

In this article, we are given a singly linked list. Our task is to create a C program to reverse each node value in the linked list − meaning if a node contains 123, it should become 321. A singly linked list is a linear data structure where each node contains data and a pointer to the next node in the sequence. Problem Example Input: 34 → 12 → 89 → 56 → 72 Output: 43 → 21 → 98 → 65 → 27 Approach To solve this problem, we will: Traverse each ...

Read More

How to position text to top right position on an image with CSS

Nancy Den
Nancy Den
Updated on 15-Mar-2026 1K+ Views

To position text to the top right corner of an image, you need to use CSS positioning properties. This involves making the container element relatively positioned and the text absolutely positioned with top and right properties. Syntax .container { position: relative; } .text-overlay { position: absolute; top: value; right: value; } Example The following example demonstrates how to position text in the top right corner of an image − ...

Read More

C program to Replace a word in a text by another given word

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

In this program, we have given three strings: text, oldword, and newword. Our task is to create a C program to replace a word in a text by another given word. The program will search for all the occurrences of the oldword in the text and replace it with newword. Syntax void replaceWordInText(const char *text, const char *oldWord, const char *newWord); Example: Input and Expected Output Let's take an example to understand the problem − Input: text = "I am learning programming" oldword = "learning" newword = "practicing" Output: ...

Read More

How to add rounded corners to a button with CSS?

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 3K+ Views

To add rounded corners to a button, use the border-radius property. This property allows you to control the curvature of your button corners, creating a more modern and polished appearance. Syntax button { border-radius: value; } Possible Values ValueDescription lengthDefines the radius in px, em, rem, etc. %Defines the radius as a percentage of the button's dimensions 50%Creates a circular button (if width equals height) Example: Basic Rounded Button You can try to run the following code to add rounded corners − ...

Read More
Showing 20991–21000 of 61,297 articles
Advertisements