Articles on Trending Technologies

Technical articles with clear explanations and examples

C program for Binomial Coefficients table

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

Given with a positive integer value let's say 'val' and the task is to print the value of binomial coefficient B(n, k) where, n and k be any value between 0 to val and hence display the result. What is Binomial Coefficient Binomial coefficient (n, k) is the order of choosing 'k' results from the given 'n' possibilities. The value of binomial coefficient of positive n and k is given by − Syntax C(n, k) = n! / (k! * (n-k)!) where, n >= k Example of Binomial Coefficient Calculation For ...

Read More

Role of CSS :visited Selector

varma
varma
Updated on 15-Mar-2026 274 Views

The CSS :visited selector is used to style links that have been visited by the user. This pseudo-class allows you to apply different styles to links based on whether they have been clicked before, providing visual feedback to users about their browsing history. Syntax a:visited { property: value; } Example: Basic Visited Link Styling The following example demonstrates how to style visited links with different colors and properties − a:link { color: ...

Read More

C Program for sum of cos(x) series

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

We are given with the value of x and n where, x is the angle for cos and n is the number of terms in the cos(x) series. The cosine series allows us to calculate cos(x) using polynomial approximation instead of built-in trigonometric functions. Cos(x) Function Cos(x) is a trigonometric function which calculates the cosine of an angle. It can be represented as an infinite series using Taylor expansion. Cosine Function Properties: • Range: [-1, 1] • Period: 2π radians (360°) • cos(0) = 1, cos(π/2) = 0 ...

Read More

Role of CSS: valid Selector

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

The CSS :valid selector is used to style form input elements that contain valid values according to their specified type or validation constraints. This pseudo-class selector automatically applies styles when the input meets the validation criteria. Syntax input:valid { /* styles for valid inputs */ } Example: Email Validation Styling The following example demonstrates how to style email inputs with valid email addresses − input[type="email"] { padding: 10px; ...

Read More

Role of CSS :target Selector

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

The CSS :target selector is a powerful pseudo-class that targets an element whose id matches the fragment identifier in the current URL. This allows you to style elements when they are directly accessed through anchor links, creating smooth navigation highlighting and interactive content sections. Syntax :target { /* CSS properties */ } How :target Works When a user clicks on a link with a fragment identifier (like #section1), the browser navigates to the element with that id. The :target selector automatically applies styles to that specific element, making it visually ...

Read More

C Program for nth Catalan Number

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

Given an integer n, the task is to find the Catalan Number at the nth position. Catalan numbers are a sequence of natural numbers that occur in various counting problems in combinatorics and computer science. Catalan numbers C0, C1, C2, … Cn are defined by the formula − $$c_{n}=\frac{1}{n+1}\binom{2n}{n} = \frac{2n!}{(n+1)!n!}$$ The first few Catalan numbers for n = 0, 1, 2, 3, … are 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, … Syntax unsigned long int catalan(unsigned int n); Applications of Catalan Numbers Counting the number ...

Read More

Style the document's root element with CSS

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

The CSS :root pseudo-class selector targets the document's root element. In HTML documents, this is the element. It's commonly used to define CSS custom properties (variables) and global styles. Syntax :root { property: value; } Example 1: Basic Root Element Styling The following example applies background and text color to the root element − :root { background: blue; color: white; ...

Read More

C Program that receives a number and prints it out in large size

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

In C, we can create a program that displays numbers in large size using ASCII art patterns made with hash symbols. This technique is useful for creating visually appealing banner-style output or digital displays. Syntax void printLargeNumber(char number[]); Approach The solution uses predefined character arrays to store ASCII art patterns for each digit (0-9). Each digit pattern is 7 rows high and 8 characters wide − Define 2D character arrays for each digit's visual pattern Traverse the input string character by character Print corresponding patterns row by row to display digits side ...

Read More

CSS position: sticky;

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

The CSS position: sticky property creates a hybrid positioning behavior where an element toggles between relative and fixed positioning depending on the scroll position. The element is positioned relative until it reaches a specified threshold, then becomes fixed in place. Syntax selector { position: sticky; top: value; } How It Works A sticky element behaves like position: relative until the viewport reaches the defined offset position. Once the threshold is met, it becomes position: fixed and sticks to that position while scrolling. Example: Basic Sticky ...

Read More

C Program to check if a number belongs to a particular base or not

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

Given a number as a string and a base, the task is to check whether the given number belongs to that given base or not. We have to check the number and the base according to the number system in which there are bases like 2 for a binary number, 8 for an octal number, 10 for decimal number and 16 for a Hexadecimal number. According to this we have to find whether the given number in a string belongs to a particular base or not. If it belongs to a particular base then we have to print "Yes" ...

Read More
Showing 21191–21200 of 61,297 articles
Advertisements