Articles on Trending Technologies

Technical articles with clear explanations and examples

Predefined Identifier __func__ in C

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

The __func__ is a predefined identifier in C that provides the name of the current function. It was introduced in C99 standard and is automatically available in every function without any declaration. Syntax __func__ The __func__ identifier is implicitly declared as if the following declaration appears at the beginning of each function − static const char __func__[] = "function-name"; Example 1: Basic Usage Here's a simple example showing how __func__ returns the current function name − #include void function1(void) { printf("Current function: ...

Read More

Style input type button with CSS

mkotla
mkotla
Updated on 15-Mar-2026 5K+ Views

The input type button can be a submit button or reset button. With CSS, we can style any button on a web page to enhance its appearance and user experience. Syntax input[type=button] { property: value; } Example 1: Basic Button Styling The following example demonstrates how to style an input type button with background color, padding, and hover effects − input[type=button] { background-color: #ff6600; ...

Read More

Print * in place of characters for reading passwords in C

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

In C programming, when handling passwords, it's important to hide the actual characters from being displayed on screen for security reasons. This involves replacing each character of the password with an asterisk (*) symbol. Let's take an example to understand the problem − Input: password Output: ******** Syntax for(int i = 0; i < strlen(password); i++){ printf("*"); } Example 1: Using Predefined Password String The below program demonstrates how to replace each character of a password string with asterisks ? #include #include ...

Read More

Shorthand property to set all the animation properties with CSS

Krantik Chavan
Krantik Chavan
Updated on 15-Mar-2026 244 Views

The CSS animation property is a shorthand that allows you to set multiple animation properties in a single declaration. It combines animation duration, name, timing function, delay, iteration count, direction, fill mode, and play state into one convenient property. Syntax selector { animation: duration | timing-function | delay | iteration-count | direction | fill-mode | play-state | name; } Possible Values PropertyDescriptionDefault animation-nameSpecifies the name of the @keyframes rulenone animation-durationSpecifies how long the animation takes0s animation-timing-functionSpecifies the speed curveease animation-delaySpecifies when the animation starts0s animation-iteration-countSpecifies how many times to ...

Read More

Print 1 2 3 infinitely using threads in C

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

In C programming, we can print the sequence "1 2 3" infinitely using multiple threads with proper synchronization. This demonstrates thread coordination using mutexes and condition variables to ensure orderly execution. Syntax pthread_create(&thread_id, NULL, thread_function, argument); pthread_mutex_lock(&mutex); pthread_cond_wait(&condition, &mutex); pthread_cond_signal(&condition); pthread_mutex_unlock(&mutex); Installation: On Linux systems, compile with: gcc filename.c -lpthread Example This program creates three threads that print numbers 1, 2, and 3 in sequence infinitely. Each thread waits for its turn using condition variables − #include #include pthread_cond_t cond1 = PTHREAD_COND_INITIALIZER; pthread_cond_t cond2 = PTHREAD_COND_INITIALIZER; ...

Read More

CSS animation-timing-function property

vanithasree
vanithasree
Updated on 15-Mar-2026 98 Views

The CSS animation-timing-function property specifies the speed curve of an animation. It defines how an animation progresses during its duration, controlling whether the animation starts slow and speeds up, starts fast and slows down, or maintains a constant speed. Syntax animation-timing-function: value; Possible Values ValueDescription easeSlow start, fast middle, slow end (default) ease-inSlow start, then fast ease-outFast start, then slow ease-in-outSlow start, fast middle, slow end linearConstant speed throughout cubic-bezier(x1, y1, x2, y2)Custom timing function Example: Different Timing Functions The following example demonstrates various timing functions applied to animated boxes ...

Read More

Print 2D matrix in different lines and without curly braces in C/C++

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

Here, we will see how to print a 2D matrix in C programming language without using curly braces. This technique uses a clever approach to eliminate the need for braces in nested loops. Curly braces are separators in C that define separate code blocks in the program. Without curly braces, defining scopes is difficult, but we can use a shorthand technique to achieve the same result for simple operations. Syntax for (int i = 0; i < rows; i++) for (int j = 0; j < cols; j++) ...

Read More

Integer to Roman in C

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 7K+ Views

Given a decimal number n, we have to convert this into Roman numeral. The value n lies in the range 1 to 4000. Roman numerals use specific symbols and follow subtraction rules for certain combinations. Number Numeral 1 I 4 IV 5 V 9 IX 10 X 40 XL 50 L 90 XC 100 C 400 CD 500 D 900 CM 1000 M 4000 MMMM ...

Read More

CSS animation-play-state property

Sreemaha
Sreemaha
Updated on 15-Mar-2026 91 Views

The CSS animation-play-state property controls whether an animation is currently running or paused. This property is particularly useful for creating interactive animations that can be controlled dynamically. Syntax selector { animation-play-state: running | paused; } Possible Values ValueDescription runningThe animation is currently running (default value) pausedThe animation is paused Example: Paused Animation The following example shows an animation that is set to paused state − .box { width: ...

Read More

CSS animation-name property

radhakrishna
radhakrishna
Updated on 15-Mar-2026 114 Views

The CSS animation-name property specifies the name of the @keyframes animation to apply to an element. This property links an element to its corresponding keyframe animation definition. Syntax selector { animation-name: keyframe-name; } Possible Values ValueDescription keyframe-nameName of the @keyframes animation to apply noneNo animation is applied (default) Example: Color Animation The following example demonstrates how to use the animation-name property to apply a color transition animation − div { ...

Read More
Showing 21061–21070 of 61,297 articles
Advertisements