Articles on Trending Technologies

Technical articles with clear explanations and examples

Fixed Positioning with CSS

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 447 Views

The CSS position: fixed property positions an element relative to the browser window (viewport). Unlike other positioning methods, fixed elements remain in the same position even when the page is scrolled, making them ideal for navigation bars, headers, or footers that should always be visible. Syntax selector { position: fixed; top: value; /* optional */ right: value; /* optional */ bottom: value; /* optional */ left: value; /* optional */ } ...

Read More

C Program for Print the pattern by using one loop

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

In C programming, printing patterns using a single loop is an interesting challenge that demonstrates the creative use of loop control statements like continue. This approach combines the functionality of nested loops into one loop by manipulating loop variables and using conditional statements. Syntax for (initialization; condition; ) { // Logic with continue statement // Manual increment of loop variable } Algorithm START Step 1 → Declare variables i and j to 0 with number of rows n = 6 Step 2 → Loop For i=1 and i

Read More

Print triplets with sum less than or equal to k in C Program

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

Given an array with a set of elements, the task is to find all triplets (sets of exactly three elements) having sum less than or equal to a given value k. Input − arr[] = {1, 2, 3, 8, 5, 4}, k = 10 Output − triplets → {1, 2, 3} {1, 2, 5} {1, 2, 4} {1, 3, 5} {1, 3, 4} {1, 5, 4} {2, 3, 5} {2, 3, 4} Syntax for (i = 0; i < size-2; i++) { for (j = i+1; j < size-1; j++) { for (k = j+1; k < size; k++) { if (arr[i] + arr[j] + arr[k]

Read More

CSS positioning related properties

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

The positioning related properties in CSS allow you to control where elements appear on a webpage. CSS offers several positioning methods to place elements precisely where you want them. Syntax selector { position: value; top: value; right: value; bottom: value; left: value; } Position Property Values ValueDescription relativeElement is positioned relative to its normal position absoluteElement is positioned relative to its nearest positioned ancestor fixedElement is positioned relative to the viewport (browser window) ...

Read More

Print longest palindrome word in a sentence in C Program

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

In C programming, finding the longest palindrome word in a sentence involves parsing individual words and checking if they read the same forwards and backwards. A palindrome is a word that remains identical when its characters are reversed. What is a Palindrome? A palindrome is a word or sequence that reads the same backward as forward. For example, "malayalam" is a palindrome because reversing it gives "malayalam" − the same word. Examples of palindromes: radar, level, madam, racecar Syntax int isPalindrome(char word[], int start, int end); void findLongestPalindrome(char sentence[]); Algorithm The ...

Read More

Print n 0s and m 1s such that no two 0s and no three 1s are together in C Program

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

In C programming, we need to print a sequence of N zeros and M ones such that no two zeros are consecutive and no three ones are consecutive. This is a constraint satisfaction problem that requires careful arrangement of digits. Syntax // Condition to check if sequence is possible if ((m < n-1) || m >= 2 * (n + 1)) // Sequence not possible else // Generate valid sequence Algorithm The algorithm works in three main cases − Case 1: When m = ...

Read More

Usage of CSS visibility property

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

The CSS visibility property controls whether an element is visible or hidden. Unlike display: none, hidden elements with visibility: hidden still occupy space in the layout. Syntax selector { visibility: value; } Possible Values ValueDescription visibleThe element and its contents are shown to the user (default) hiddenThe element and its content are invisible, but still affect the page layout collapseUsed only with table rows and columns to remove them from display Example: Visible vs Hidden Elements The following example demonstrates how visibility: hidden hides elements while ...

Read More

Values of CSS overflow property

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

CSS provides a property called overflow that tells the browser what to do if the box's contents are larger than the box itself. Syntax selector { overflow: value; } Possible Values ValueDescription visibleAllows the content to overflow the borders of its containing element hiddenThe content is cut off at the border and no scrollbars are visible scrollScrollbars are added to allow scrolling through the content autoScrollbars appear only if the content overflows Example: Visible Overflow The following example demonstrates the visible value where content overflows outside ...

Read More

C Program for Print individual digits as words without using if or switch.

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

In C programming, converting individual digits of a number to their corresponding words is commonly done using if-else or switch statements. However, we can achieve this more elegantly using an array of string pointers to map each digit (0-9) to its word representation. Syntax char *digitWords[] = {"ZERO", "ONE", "TWO", ..., "NINE"}; // Access digit word using: digitWords[digit] Algorithm START Step 1 → Declare int variables num, i and array of pointers char *alpha with values {"ZERO", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE"} Step 2 → Read or assign the ...

Read More

Print first k digits of 1/n where n is a positive integer in C Program

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

In C programming, we need to find the first k digits of the decimal representation of 1/n without using floating-point arithmetic. This involves simulating the long division process using integer operations only. Syntax // Basic approach using modular arithmetic for(i = 0; i < k; i++) { digit = (10 * remainder) / n; remainder = (10 * remainder) % n; } Algorithm The algorithm simulates manual long division − Step 1: Initialize remainder = 1 (representing the dividend "1") Step 2: For each ...

Read More
Showing 21611–21620 of 61,297 articles
Advertisements