Articles on Trending Technologies

Technical articles with clear explanations and examples

Program to check if a string contains any special character in C

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

In C programming, checking if a string contains special characters is a common validation task. Special characters are those that are neither alphabetic nor numeric, such as symbols like !@#$%^&*() etc. Syntax int checkSpecialCharacter(char str[], int length); Method 1: Using Character Comparison This method iterates through each character and compares it against a predefined set of special characters − #include #include int checkSpecialCharacter(char str[], int n) { int i; for (i = 0; i < n; i++) { ...

Read More

Usage of CSS grid-row-gap property

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

The CSS grid-row-gap property is used to set the gap (space) between grid rows in a CSS Grid container. This property allows you to control the vertical spacing between grid items, making your layout more visually appealing and easier to read. Syntax selector { grid-row-gap: length; } Possible Values ValueDescription lengthDefines the gap size using units like px, em, rem, %, etc. 0Default value with no gap between rows Example The following example demonstrates how to create a grid layout with a 20px gap between rows ...

Read More

Create a Bordered Button Group with CSS

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

The CSS border property allows you to create visually appealing button groups with defined borders around each button. This technique is useful for creating navigation menus, toolbars, or any grouped interactive elements. Syntax .button-group { /* Container styles */ } .button-group button { border: width style color; /* Additional button styles */ } Example: Basic Bordered Button Group The following example creates a horizontal button group with blue borders − .btn-group ...

Read More

Product of N with its largest odd digit in C

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

In C programming, we need to find the product of a given number N with its largest odd digit. If the number contains no odd digits, we return -1. Syntax int largestOddDigit(int n); int findProduct(int n); Algorithm Extract each digit of the number using modulo operation Check if the digit is odd and compare with the current largest odd digit Keep track of the maximum odd digit found Multiply the original number with the largest odd digit Return -1 if no odd digit exists Example 1: Number with Odd Digits ...

Read More

Product of maximum in first array and minimum in second in C

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

Given two arrays, we need to find the product of the maximum element from the first array and the minimum element from the second array. This is a common programming problem that demonstrates array traversal and basic mathematical operations. Syntax int findMaxElement(int arr[], int size); int findMinElement(int arr[], int size); int calculateProduct(int arr1[], int arr2[], int n1, int n2); Method 1: Using Sorting Approach In this approach, we sort both arrays and then multiply the last element of the first array with the first element of the second array − #include ...

Read More

Set the speed of the hover effect with CSS

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

To set the speed of the hover effect with CSS, we can control how quickly style changes occur when users hover over elements. This is achieved using two main approaches: CSS transition properties and CSS animation properties. Syntax /* Using transition */ selector { transition-duration: time; } /* Using animation */ selector:hover { animation-duration: time; } Method 1: Using transition-duration Property The transition-duration property sets how long a transition takes to complete. This creates smooth changes between normal and hover states − ...

Read More

Bitwise recursive addition of two integers in C

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

In this problem, we are given two numbers. Our task is to create a C program for the bitwise recursive addition of two integers. The logic to find the sum using bitwise operations is similar to manual addition we learned in school. For finding the sum, we add each digit and if a carry is generated, we add it to the next digit position. We will use the XOR operator to find the sum and the AND operation to check for carry. If there is a carry, we recursively add it back to the result. This is the ...

Read More

Create Hoverable Buttons with CSS

Krantik Chavan
Krantik Chavan
Updated on 15-Mar-2026 464 Views

The CSS :hover pseudo-selector is used to apply styles to an element when a user hovers their mouse over it. This creates interactive hoverable buttons that change appearance on mouse hover. Syntax selector:hover { property: value; } Example: Basic Hoverable Button The following example creates a hoverable button that changes color and border style when hovered − .btn { background-color: yellow; color: black; ...

Read More

C Programming Language Standard

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

In this article, we will learn about the standards defined in the C programming language. These standards specify how programs should be compiled and executed as defined by the development community. To understand this concept, let's examine a common C program that demonstrates standard compliance issues − What is the C Programming Language Standard? The C programming language standard defines the official specification for how C compilers should behave. It establishes the correct syntax, semantics, and behavior of C programs. The latest C standard is ISO/IEC 9899:2018, also known as C18, which was released in June 2018. ...

Read More

How to add a colored border to a button with CSS?

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 1K+ Views

The CSS border property is used to add a colored border to HTML elements, including buttons. You can customize the border's width, style, and color to create various visual effects. Syntax selector { border: width style color; } Possible Values PropertyValuesDescription widthpx, em, rem, thin, medium, thickSets the border thickness stylesolid, dashed, dotted, double, grooveDefines the border style colorcolor names, hex, rgb, hslSets the border color Example: Dashed Blue Border The following example creates a button with a 3px dashed blue border − ...

Read More
Showing 20971–20980 of 61,297 articles
Advertisements