Articles on Trending Technologies

Technical articles with clear explanations and examples

C Program for Arrow Star Pattern

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

In C programming, an arrow star pattern is a visual pattern that resembles an arrow shape using asterisk (*) characters. The pattern consists of two parts: an upper section that decreases in width and a lower section that increases in width, creating an arrow-like appearance. Syntax void printArrowPattern(int n); Algorithm The arrow pattern generation follows these steps − Upper Part: Print decreasing number of stars with increasing leading spaces Lower Part: Print increasing number of stars with decreasing leading spaces Use nested loops to control spaces and stars for each row ...

Read More

Role of CSS :invalid Selector

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

The CSS :invalid pseudo-class selector targets form elements that fail validation constraints. It automatically applies styles to input fields when their values don't meet the specified requirements, providing immediate visual feedback to users. Syntax selector:invalid { property: value; } Example: Email Validation Styling The following example applies a red background to an email input when the value is invalid − input:invalid { background-color: #ffcccc; ...

Read More

Style links on mouse over with CSS

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

To style links on mouse over with CSS, use the :hover pseudo-selector. This selector allows you to apply styles when a user hovers their mouse cursor over an element. Syntax a:hover { property: value; } Example: Basic Link Hover Effect The following example changes the background color of a link when you hover over it − a { text-decoration: none; padding: 10px 15px; ...

Read More

C Program to check if a number is divisible by sum of its digits

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

Given a number n we have to check whether the sum of its digits divide the number n or not. To find out we have to sum all the numbers starting from the unit place and then divide the number with the final sum. Like we have a number "521" so we have to find the sum of its digit that will be "5 + 2 + 1 = 8" but 521 is not divisible by 8 without leaving any remainder. Let's take another example "60" where "6+0 = 6" which can divide 60 and will not leave ...

Read More

Role of CSS :first-of-type Selector

George John
George John
Updated on 15-Mar-2026 218 Views

The CSS :first-of-type pseudo-class selector targets the first element of its type among siblings within the same parent container. It's particularly useful for styling the first occurrence of specific HTML elements without adding extra classes. Syntax element:first-of-type { property: value; } Example: First Paragraph Styling The following example demonstrates how to style the first paragraph element within its parent − p:first-of-type { background-color: orange; ...

Read More

C Program to check if the points are parallel to X axis or Y axis

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

Given n number of points we have to check that whether the point is parallel to x-axis or y-axis or no axis according to a graph. A graph is a figure which is used to show a relationship between two variables each measured along with axis at right angles. Parallel are the same lines which are having same distance at all points, like railway tracks are parallel to each other. So, we have to find whether the points are parallel to x-axis or y-axis means the distance between the coordinates and the axis are same at all points. ...

Read More

Role of CSS: first-child Selector

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

The CSS :first-child selector targets the first child element of its parent, regardless of element type. It's commonly used to apply special styling to the first item in a list or the first paragraph in a container. Syntax selector:first-child { property: value; } Example: Basic Usage The following example styles every element that is the first child of its parent − p:first-child { background-color: orange; ...

Read More

C Program for replacing one digit with other

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

Given a number n, we have to replace a digit x from that number with another given number m. We have to look for the number whether the digit is present in the given number or not, if it is present in the given number then replace that particular digit x with another digit m. Like we are given with a number "123" and m as 5 and the digit to be replaced i.e. x as "2", so the result should be "153". Syntax int digitReplace(int n, int digit, int replace); Algorithm The ...

Read More

Role of CSS :enabled Selector

seetha
seetha
Updated on 15-Mar-2026 279 Views

The CSS :enabled selector is a pseudo-class used to style form elements that are enabled and can be interacted with by users. This selector targets input fields, buttons, and other form controls that are not disabled. Syntax :enabled { /* CSS properties */ } /* Or target specific elements */ input:enabled { /* CSS properties */ } Example: Styling Enabled Input Fields The following example demonstrates how to style enabled input fields with a blue background while disabled fields remain unaffected − ...

Read More

Transform the element by using 16 values of matrix with CSS3

George John
George John
Updated on 15-Mar-2026 286 Views

The CSS matrix3d() function is used to transform HTML elements in 3D space using a 4x4 transformation matrix with 16 values. This powerful function allows you to perform complex 3D transformations including rotation, scaling, skewing, and translation all in one declaration. Syntax transform: matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4); Parameters ValuesDescription a1, b1, c1, d1First row of the 4x4 matrix − controls X-axis scaling and rotation a2, b2, c2, d2Second row of the 4x4 matrix − controls Y-axis scaling and rotation a3, b3, ...

Read More
Showing 21231–21240 of 61,297 articles
Advertisements