Articles on Trending Technologies

Technical articles with clear explanations and examples

Binary Search for Rational Numbers without using floating point arithmetic in C program

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

In this problem, we are given a sorted array of rational numbers and we have to search the given element using binary search algorithm without using floating point arithmetic. A Rational number is a number represented in the form p/q where both p and q are integers. For example, 2/3, 1/5. Binary search is a searching technique that works by finding the middle of the array and comparing elements to determine which half contains the target. For finding the element using binary search from a sorted array of rational numbers, where floating point arithmetic is not allowed, ...

Read More

Set all the top border properties in one declaration using CSS

varun
varun
Updated on 15-Mar-2026 334 Views

The CSS border-top property is used to set all the top border properties in one declaration. This shorthand property combines border-top-width, border-top-style, and border-top-color into a single property. Syntax selector { border-top: width style color; } Possible Values ValueDescription widthSets the width of the top border (thin, medium, thick, or length units) styleSets the style of the top border (solid, dashed, dotted, etc.) colorSets the color of the top border (color name, hex, rgb, etc.) Example: Basic Border Top Declaration The following example demonstrates how to ...

Read More

C program to delete a file

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

In programming, working with files is very important and every programming language has its own set of functions or library that help in manipulation of files. In C Programming Language, the remove() function can be used by the programmer to delete a file. Syntax int remove(const char *filename); Parameters The function accepts one parameter which is the name of the file that is to be deleted. File name can also be the path to the file but only if the system supports it. filename − A string containing the name of the ...

Read More

Set style to current link in a Navigation Bar with CSS

Giri Raju
Giri Raju
Updated on 15-Mar-2026 2K+ Views

To set a style to the current link in a navigation bar, you need to add an active class to the current page link and define CSS styles for it. This helps users identify which page they are currently viewing. Syntax .active { background-color: color; color: text-color; /* other styling properties */ } Example The following example demonstrates how to style the current link in a navigation bar − ul { ...

Read More

C program to find the Roots of Quadratic equation

Ayush Gupta
Ayush Gupta
Updated on 15-Mar-2026 3K+ Views

In this tutorial, we will be discussing a program to find the roots of a quadratic equation using the quadratic formula. Given a quadratic equation of the form ax2 + bx + c = 0, our task is to find the roots x1 and x2 of the given equation. For this, we use the discriminant method where the discriminant D = b2 - 4ac determines the nature of the roots. Syntax D = b*b - 4*a*c x1 = (-b + sqrt(D)) / (2*a) x2 = (-b - sqrt(D)) / (2*a) Nature of Roots ...

Read More

Create a transparent box with CSS

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

Creating a transparent box in CSS allows you to make elements semi-transparent, revealing content behind them. The most common approach is using the opacity property, which controls the transparency level of an entire element. Syntax selector { opacity: value; } Possible Values ValueDescription 0Completely transparent (invisible) 0.1 - 0.9Semi-transparent (decimal values) 1Completely opaque (default) Example The following example demonstrates how to create transparent boxes with different opacity levels − div { ...

Read More

C Program for Hexagonal Pattern

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

We are given with an integer 'n' and the task is to generate the hexagonal pattern and display the final output. Syntax void pattern(int n); Example Let's see the hexagonal pattern for n=5 and n=4 − Input: n=5 Output: * * * * * * * * * * * * * * ...

Read More

Set the opacity for the background color with CSS

varun
varun
Updated on 15-Mar-2026 302 Views

To set the opacity for the background color, use the RGBA color values or the opacity property. RGBA allows you to control the transparency of just the background, while the opacity property affects the entire element including text and child elements. Syntax /* Using RGBA for background opacity */ selector { background-color: rgba(red, green, blue, alpha); } /* Using opacity property */ selector { opacity: value; } Method 1: Using RGBA Values The RGBA color model allows you to specify opacity only for the background ...

Read More

C Program for Circumference of a Parallelogram

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

We are given the sides of a parallelogram and the task is to calculate the circumference of the parallelogram with its given sides and display the result. What is a Parallelogram? A parallelogram is a type of quadrilateral which has − Opposite sides parallel and equal Opposite angles equal Diagonals bisect each other In the below figure, 'a' and 'b' are the sides of a parallelogram where parallel sides are shown. a a b b ...

Read More

Add transparency to the background with CSS

usharani
usharani
Updated on 15-Mar-2026 361 Views

The CSS opacity property is used to add transparency to the background of an element. The property accepts values from 0 (completely transparent) to 1 (completely opaque), allowing you to create various levels of transparency effects. Syntax selector { opacity: value; } Possible Values ValueDescription 0Completely transparent (invisible) 0.1 - 0.9Partially transparent with varying degrees 1Completely opaque (default) Example: Different Opacity Levels The following example demonstrates different transparency levels using the opacity property − div { ...

Read More
Showing 21181–21190 of 61,297 articles
Advertisements