Articles on Trending Technologies

Technical articles with clear explanations and examples

CSS Box Sizing Property

Priya Pallavi
Priya Pallavi
Updated on 15-Mar-2026 146 Views

The CSS box-sizing property controls how the width and height of an element are calculated. By default, padding and border are added to the specified width and height, but this property allows you to change this behavior. Syntax selector { box-sizing: value; } Possible Values ValueDescription content-boxDefault. Width and height apply to content only border-boxWidth and height include content, padding, and border Default Behavior (content-box) By default, CSS follows this calculation − Total width = width + padding + border Total height = height ...

Read More

Print nodes of linked list at given indexes in C language

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

In C programming, printing nodes of a linked list at given indexes involves traversing the list and accessing elements at specific positions. Unlike arrays, linked lists don't have direct indexing, so we must traverse from the head node counting positions until we reach the desired index. Syntax void printAtIndex(struct node* head, int index); void printMultipleIndexes(struct node* head, int indexes[], int size); Example 1: Print Single Node at Given Index This example demonstrates how to print a node at a specific index − #include #include struct node { ...

Read More

CSS2 sizing property vs CSS3 box sizing property

varma
varma
Updated on 15-Mar-2026 372 Views

Let us understand the difference between CSS2 sizing property and CSS3 box-sizing property. In CSS2, the width and height properties only apply to the content area, while CSS3 box-sizing property allows you to control how the total element size is calculated. Syntax selector { box-sizing: value; } Possible Values ValueDescription content-boxDefault CSS2 behavior - width/height applies only to content border-boxCSS3 behavior - width/height includes content, padding, and border CSS2 Default Sizing (content-box) In CSS2, the width and height properties apply only to the content area. Padding ...

Read More

Print n x n spiral matrix using O(1) extra space in C Program.

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

We are given a positive integer n and need to create a spiral matrix of n x n using only O(1) extra space in clockwise direction. A spiral matrix starts from the center and fills values in a spiral pattern outward. The spiral matrix fills values in clockwise direction starting from the center. For example, a 3x3 matrix would fill as: center → right → down → left → up and so on. ...

Read More

CSS3 Resize Property

Sreemaha
Sreemaha
Updated on 15-Mar-2026 133 Views

The CSS3 resize property allows users to resize elements by dragging from the bottom-right corner. It provides control over which dimensions can be resized by the user. Syntax selector { resize: value; } Possible Values ValueDescription noneUser cannot resize the element (default) horizontalUser can resize horizontally only verticalUser can resize vertically only bothUser can resize in both directions Example 1: Both Directions The following example allows users to resize the element in both horizontal and vertical directions − ...

Read More

Set the border image as rounded, repeated and stretched with CSS

mkotla
mkotla
Updated on 15-Mar-2026 328 Views

The border-image-repeat property is used to set how the border image is repeated, stretched, or rounded along the border edges. This property controls the behavior of the border image segments between the corners. Syntax selector { border-image-repeat: value; } Possible Values ValueDescription stretchThe border image is stretched to fill the area (default) repeatThe border image is repeated to fill the area roundThe border image is repeated and scaled to fit the area perfectly spaceThe border image is repeated with spacing to fill the area Example 1: Round ...

Read More

Print the last k nodes of the linked list in reverse order Recursive Approaches in C language

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

In C programming, printing the last k nodes of a linked list in reverse order using recursion is an elegant approach that leverages the function call stack. This technique traverses the entire list recursively and then prints the nodes during the return phase of recursion. Syntax void printLastKNodesReverse(struct node* head, int* count, int k); Algorithm The recursive algorithm works in two phases − Forward traversal: Recursively traverse to the end of the list Backward counting: During return, increment counter and print nodes if count ≤ k Linked ...

Read More

Set the image path with CSS

Ankitha Reddy
Ankitha Reddy
Updated on 15-Mar-2026 787 Views

The CSS border-image-source property is used to set the path of an image that will be used as a border around an element. This property allows you to replace traditional solid borders with custom images for more creative styling. Syntax selector { border-image-source: url(path-to-image) | none; } Possible Values ValueDescription url()Specifies the path to the image file noneNo image is used (default value) Example: Setting Image Border Path The following example demonstrates how to set an image path for creating a decorative border − ...

Read More

Print the alternate nodes of linked list (Iterative Method) in C language

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

In this problem, we need to print alternate nodes from a linked list, which means printing every other node starting from the first node. The iterative method uses loops to traverse the linked list and prints nodes at even positions (0th, 2nd, 4th, etc.). For example, if the list contains nodes 29, 34, 43, 56, and 88, the output will be alternate nodes: 29, 43, and 88. 29 34 43 ...

Read More

CSS border-image property

seetha
seetha
Updated on 15-Mar-2026 115 Views

The CSS border-image property allows you to use an image as the border of an element instead of the standard border styles. This property is useful for creating decorative borders using custom images. Syntax selector { border-image: source slice width outset repeat; } Possible Values PropertyDescription sourceThe image to be used as border (url or gradient) sliceHow to slice the border image (in pixels or %) widthThe width of the border image outsetHow much the border extends beyond the border box repeatHow border image is repeated (stretch, repeat, round, ...

Read More
Showing 21381–21390 of 61,297 articles
Advertisements