Articles on Trending Technologies

Technical articles with clear explanations and examples

Write you own Power without using multiplication(*) and division(/) operators in C Program

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

Power function is calculated using repeated multiplication i.e. 5n is 5*5*5… n times. To implement this without using multiplication(*) and division(/) operators, we will use nested loops that add numbers repeatedly to simulate multiplication. Syntax int power(int base, int exponent); Example: Using Nested Loops This approach uses nested loops where the outer loop runs for the exponent value and the inner loop performs repeated addition to simulate multiplication − #include int power(int base, int exponent) { if (exponent == 0) { ...

Read More

CSS line-height property

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 158 Views

The CSS line-height property is used to set the height of a line of text. It controls the spacing between lines of text within an element, affecting readability and visual appearance. Syntax selector { line-height: value; } Possible Values ValueDescription normalDefault value, usually around 1.2 times the font size numberA number multiplied by the font size (e.g., 1.5) lengthFixed length in px, em, rem, etc. %Percentage of the font size Example: Setting Line Height The following example demonstrates different line-height values applied to paragraphs − ...

Read More

Sum of squares of the first n even numbers in C Program

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

The sum of squares of the first n even numbers means we calculate the square of each even number (2, 4, 6, 8, ..., 2n) and add them together. For example, for n=3, we compute 2² + 4² + 6² = 4 + 16 + 36 = 56. There are two methods to find the sum of squares of the first n even numbers − Syntax // Using loop approach sum = 0; for (i = 1; i

Read More

CSS width property

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

The CSS width property is used to set the width of an element. It defines how wide an element should be, and can accept various types of values including lengths, percentages, or keywords. Syntax selector { width: value; } Possible Values ValueDescription autoBrowser calculates the width automatically (default) lengthDefines width in px, em, rem, cm, etc. %Defines width as a percentage of the parent element initialSets width to its default value inheritInherits width from the parent element Example: Setting Fixed Width The following example demonstrates setting ...

Read More

A C Puzzle in C Programming?

Akansha Kumari
Akansha Kumari
Updated on 15-Mar-2026 2K+ Views

C programming puzzles are small but tricky coding problems designed to challenge and enhance understanding of the C programming language through creative solutions. Problem Statement We are given two numbers, and our task is to combine them in such a way that the second integer is placed before the first integer, resulting in a single combined integer. However, we are not allowed to use any logical, arithmetic, string-related operations, or any pre-defined functions. Consider the following input/output scenarios to understand the puzzle statement better − Scenario 1 Input: 12, 54 Output: 5412 ...

Read More

CSS height property

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 144 Views

The CSS height property is used to set the height of an element. It determines how tall an element will be, and can accept various types of values including lengths, percentages, or keywords. Syntax selector { height: value; } Possible Values ValueDescription autoBrowser calculates the height automatically (default) lengthDefines height in px, em, rem, cm, etc. %Defines height as a percentage of the parent element initialSets the property to its default value inheritInherits the value from parent element Example: Setting Fixed Height The following example demonstrates ...

Read More

A Boolean Array Puzzle in C?

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

This is an array-based puzzle that requires you to change all the numbers of an array that contains two elements to 0. One element of the array is 0 and the other may or may not be 0. To solve this puzzle, the program needs to find the non-zero element and change it to 0. There are the following constraints that are needed to solve the boolean array puzzle − Allowed operation is complement, other operations are not allowed. Loops and conditional statements are not allowed. Direct assignment is also not allowed. Syntax ...

Read More

Set outline style as a solid single line with CSS

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 139 Views

The CSS outline-style property with the value solid creates a solid single line outline around an element. This outline appears outside the element's border and does not affect the layout or positioning of other elements. Syntax selector { outline-style: solid; } Example The following example shows how to create a solid outline around a paragraph element − .solid-outline { outline-width: 3px; outline-style: solid; ...

Read More

Abundant Number in C ?

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

An abundant number (also known as excessive number) is a positive integer that is smaller than the sum of all its proper divisors. Proper divisors are all the positive divisors of a number except the number itself. For example, 12 is an abundant number because its proper divisors are 1, 2, 3, 4, and 6, and their sum (1+2+3+4+6 = 16) is greater than 12. The difference between the sum of proper divisors and the number is called abundance. For the above example, abundance = 16 − 12 = 4. Syntax // Check if number is ...

Read More

Set outline style as ridge with CSS

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

To set the outline style as ridge, use the outline-style property with the value ridge. The ridge outline creates a 3D raised effect that appears to protrude from the page surface, opposite to the groove style which looks carved into the page. Syntax selector { outline-style: ridge; } Example The following example demonstrates how to apply a ridge outline style to a paragraph − .ridge-outline { outline-width: 3px; ...

Read More
Showing 21631–21640 of 61,297 articles
Advertisements