Articles on Trending Technologies

Technical articles with clear explanations and examples

Write a program to Delete a Tree in C programming

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

To delete a tree in C programming, we need to traverse each node and free the memory allocated to them. The key is to delete nodes in the correct order − children must be deleted before their parents to avoid memory leaks and dangling pointers. Post-order traversal is ideal for this operation as it visits children before the parent node. Syntax void deleteTree(struct node* root) { if (root == NULL) return; deleteTree(root->left); deleteTree(root->right); free(root); } How Post-order Traversal Works ...

Read More

Make any particular color transparent with CSS Filters

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 1K+ Views

The CSS chroma filter is a legacy Internet Explorer filter that was used to make a specific color transparent in an element. This filter allows you to specify a color that should become transparent, effectively creating a "color key" effect similar to green screen technology. Syntax selector { filter: Chroma(Color = #colorvalue); } Parameters ParameterDescription ColorThe hexadecimal color value that you want to make transparent Example: Making White Background Transparent The following example demonstrates how to make white color (#FFFFFF) transparent in an image − ...

Read More

Role of CSS Filters

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

CSS filters allow you to apply visual effects like blur, brightness, contrast, and more to HTML elements without using external graphics. The filter property provides a powerful way to manipulate the rendering of images, backgrounds, and even text elements. Syntax selector { filter: filter-function(value); } Common Filter Functions Filter FunctionDescriptionValue Range blur()Applies blur effect0px to any px value brightness()Adjusts brightness0% to any percentage contrast()Adjusts contrast0% to any percentage grayscale()Converts to grayscale0% to 100% hue-rotate()Rotates hue colors0deg to 360deg Example: Basic Image Filters The following example demonstrates ...

Read More

Write a function that returns 2 for input 1 and returns 1 for 2 in C programming

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

A function that returns 2 for input 1 and 1 for input 2 can be implemented using various approaches. This is a common programming exercise that demonstrates different logical and mathematical techniques for value swapping between two specific numbers. Syntax int functionName(int x); Method 1: Using Conditional Statement The simplest approach uses an if-else statement to check the input value and return the corresponding output − #include int reverseif(int x) { if (x == 1) return 2; ...

Read More

Write a C program to print " Tutorials Point " without using a semicolon

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

In C programming, semicolons are statement terminators that mark the end of each statement. However, it's possible to print text without using semicolons by leveraging control structures and the return value of printf(). Syntax int printf(const char *format, ...); The printf() function returns an integer representing the number of characters printed. This return value can be used in conditional expressions within control structures that don't require semicolons. Method 1: Using if Statement The if statement can evaluate the return value of printf() without requiring a semicolon − #include int ...

Read More

CSS Alpha Channel filter

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 2K+ Views

The CSS Alpha Channel filter is a legacy Internet Explorer filter that alters the opacity of an element, creating transparency effects and gradient blending with the background. While this filter is obsolete in modern web development, it was historically used to create alpha transparency effects. Syntax filter: Alpha(opacity=value, finishopacity=value, style=value, startX=value, startY=value, finishX=value, finishY=value); Parameters Parameter Description Opacity Level of the opacity. 0 is fully transparent, 100 is fully opaque. finishopacity Level of the opacity at the other end of the object. Style The shape of ...

Read More

Ways to paint N paintings such that adjacent paintings don't have same colors in C programming

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

In this problem, you are given N paintings and we have M colors to paint them with. We need to find the number of ways to paint the paintings such that no two adjacent paintings have the same color. The program's output can have very large values, so we calculate the answer in standard modulo 109 + 7. Syntax long long paintWays(int n, int m); long long power(long long base, long long exp, long long mod); Mathematical Formula The formula to find the number of ways is − Ways = m ...

Read More

How to import styles from another style sheet in CSS

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 601 Views

The CSS @import rule allows you to import styles from another stylesheet into your current CSS file. This rule must be placed at the very beginning of your stylesheet, before any other CSS rules. Syntax @import "stylesheet-url"; @import url("stylesheet-url"); @import url("stylesheet-url") media-query; Basic Import Example Here's how to import an external CSS file into your stylesheet − @import url("https://fonts.googleapis.com/css2?family=Arial:wght@300;700&display=swap"); body { font-family: Arial, sans-serif; ...

Read More

Surface Area and Volume of Hexagonal Prism in C programming

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

The surface area of any figure is the total area that its surface covers. A hexagonal prism is a three-dimensional figure that has a hexagon at both its ends. In mathematics, a hexagonal prism is defined as a three-dimensional figure with 8 faces, 18 edges, and 12 vertices. It consists of two hexagonal bases connected by rectangular faces. a ...

Read More

Indicate what character set the style sheet written in with CSS

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

To indicate what character set the style sheet is written in with CSS, use the @charset rule. The @charset rule must be written right at the beginning of the style sheet without even a space before it. The value is held in quotes and should be one of the standard character sets. Syntax @charset "character-set-name"; Example The following example shows how to specify the UTF-8 character set at the beginning of a CSS file − @charset "UTF-8"; ...

Read More
Showing 21571–21580 of 61,298 articles
Advertisements