Articles on Trending Technologies

Technical articles with clear explanations and examples

Integer literal in C/C++ (Prefixes and Suffixes)

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

Integer literals in C are numeric values written directly in the source code to represent integer constants. They can be modified using prefixes to specify the base (decimal, octal, hexadecimal, binary) and suffixes to specify the data type (int, long, unsigned, etc.). Integer literals are of two types − Prefixes − Indicate the number base. For example, 0x10 represents hexadecimal value 16. Suffixes − Specify the data type. For example, 123LL represents a long long integer. Syntax // Prefixes decimal_literal (no prefix) 0octal_literal (prefix ...

Read More

INT_MAX and INT_MIN in C/C++ and Applications

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

In C programming, INT_MAX and INT_MIN are predefined macros that represent the maximum and minimum values that can be stored in an int variable. These macros are defined in the header file and are essential for boundary checking and initialization in various algorithms. Syntax INT_MAX /* Maximum value for int */ INT_MIN /* Minimum value for int */ Basic Example Let's see how to use INT_MAX and INT_MIN in a simple program − #include #include int main() { ...

Read More

Create tooltips with CSS

Jennifer Nicholas
Jennifer Nicholas
Updated on 15-Mar-2026 241 Views

A tooltip is a small popup that appears when a user hovers over an element, providing additional information or context. CSS tooltips are lightweight, accessible, and don't require JavaScript. Syntax .tooltip { position: relative; } .tooltip .tooltiptext { visibility: hidden; position: absolute; z-index: 1; } .tooltip:hover .tooltiptext { visibility: visible; } Example: Basic Tooltip The following example creates a simple tooltip that appears on hover − ...

Read More

Find the Longest Substring Containing Vowels in Even Counts in C++

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 471 Views

The problem of finding the longest substring with vowels appearing an even number of times can be solved efficiently using bit manipulation and prefix sums. We need to track the parity (odd/even count) of each vowel ('a', 'e', 'i', 'o', 'u') as we traverse the string. Syntax int findLongestSubstring(char* s); Algorithm Steps The approach uses a bitmask to represent the parity state of vowels − Use a 5-bit mask where each bit represents parity of vowels a, e, i, o, u Store the first occurrence of each mask state When a mask ...

Read More

Specify the speed curve of the animation with CSS

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

The CSS animation-timing-function property specifies the speed curve of an animation, controlling how the animation progresses over time. This property determines whether the animation starts slow and speeds up, starts fast and slows down, or maintains a constant speed. Syntax selector { animation-timing-function: value; } Possible Values ValueDescription easeDefault. Slow start, fast middle, slow end ease-inSlow start, then speeds up ease-outFast start, then slows down ease-in-outSlow start and end, fast middle linearConstant speed throughout Example The following example demonstrates different timing functions applied to animated boxes ...

Read More

Creating a C/C++ Code Formatting tool with help of Clang tools

Ayush Gupta
Ayush Gupta
Updated on 15-Mar-2026 335 Views

In this tutorial, we will be discussing how to create a C/C++ code formatting tool using Python and clang-format. This tool automatically formats all C/C++ source files in a project directory according to specified coding standards. Installation Requirements: sudo apt install python3 sudo apt install clang-format How It Works The tool works by recursively scanning directories for C/C++ files and applying clang-format to each file. It uses Python's os.walk() to traverse directories and identifies source files by their extensions. Example: Python Code Formatter Script Create a Python file named format_code.py in your project ...

Read More

Set a CSS style for the element when the animation is not playing

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

The CSS animation-fill-mode property controls how an element's styles are applied before and after an animation runs. This property determines which styles are applied when the animation is not playing. Syntax selector { animation-fill-mode: value; } Possible Values ValueDescription noneNo styles are applied before or after animation (default) forwardsKeeps the final keyframe styles after animation ends backwardsApplies the first keyframe styles before animation starts bothApplies both forwards and backwards fill modes Example: Using Backwards Fill Mode The following example demonstrates how animation-fill-mode: backwards applies the starting ...

Read More

Create Directory or Folder with C/C++ Program

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

Creating a folder or directory on your computer is an important task in programming. A directory is like a container that helps store and organize files. In C, you often need to create directories to store data, logs, or configuration files. Creating directories makes file management easier. For example, if your program needs to store logs, it should check if a "logs" folder exists. If not, it can create the folder automatically, so you don't have to do it manually. In this article, we'll show you how to create a directory in C using the mkdir() function. ...

Read More

Selects all elements with CSS

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

To select all elements on a webpage, use the universal selector (*) in CSS. This selector applies styles to every HTML element within the document, making it useful for resetting default styles or applying global formatting. Syntax * { property: value; } Example The following example demonstrates how to apply styles to all elements using the universal selector − * { color: blue; background-color: ...

Read More

New Profit Sharing Ratio

Bitopi Kaashyap
Bitopi Kaashyap
Updated on 15-Mar-2026 662 Views

The profit-sharing ratio is the proportion in which partners of a partnership firm divide the profits earned from business operations. When a new partner joins, an existing partner retires, or responsibilities change, the ratio must be revised − this revised ratio is called the new profit-sharing ratio. Formula $$\mathrm{New\:Ratio = Old\:Ratio - Sacrificing\:Ratio}$$ $$\mathrm{Sacrificing\:Ratio = Old\:Ratio - New\:Ratio}$$ For retirement or death of a partner − $$\mathrm{New\:Ratio = Old\:Ratio + Gaining\:Ratio}$$ $$\mathrm{Gaining\:Ratio = \frac{Retired\:Partner's\:Share \times Individual\:Acquisition\:Ratio}{Total\:Acquisition\:Ratio}}$$ Example Calculation Case 1: New Partner Joins A, B, and C are partners sharing profits ...

Read More
Showing 21041–21050 of 61,298 articles
Advertisements